VSTS push docker-compose to Azure Container Registry and WebApp

拟墨画扇 提交于 2020-01-01 14:24:26

问题


I would like to configure continuous integration from VSTS to Azure Container Registry and then to WebApp.

Here's my docker-compose.yml file: As you can see I'm using an Asp.Net core + mssql. version: '3'

services:
  api:
    image: tbacr.azurecr.io/myservice/api
    container_name: api
    build:
      context: ./Api
      dockerfile: Dockerfile
    ports:
      - "8000:80"
    depends_on:
      - db
  db:
    image: "microsoft/mssql-server-linux"
    container_name: mssql
    environment:
        SA_PASSWORD: "testtest3030!"
        ACCEPT_EULA: "Y"
        MSSQL_PID: "Developer"
    ports:
      - "127.0.0.1:8001:1433"

Here's my task from VSTS:

And I think the major task is Build Services and PublishServices So, please take a look below: Build Services

PublishServices

And finally, in Azure Container Registry I have:

So, the question is how can I deploy it to the WebApp. I have tried right-click to api: latest repository and deploy to WebApp but the endpoint does not respond


回答1:


There is 2 steps im VSTS : build and release. It seems your build part is ok. So your docker image is pushed in your repo. Then you have to configure the build part in VSTS that will get the image you just pushed on the repo and deploy it on a server.

HTH



来源:https://stackoverflow.com/questions/47236433/vsts-push-docker-compose-to-azure-container-registry-and-webapp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!