VSTS将docker-compose推送到Azure容器注册表和WebApp [英] VSTS push docker-compose to Azure Container Registry and WebApp
问题描述
我想配置从VSTS到Azure容器注册表然后到WebApp的持续集成.
I would like to configure continuous integration from VSTS to Azure Container Registry and then to WebApp.
这是我的 docker-compose.yml 文件: 如您所见,我正在使用Asp.Net核心+ mssql. 版本:"3"
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"
这是我来自VSTS的任务:
Here's my task from VSTS:
我认为主要任务是 Build Services 和 PublishServices 因此,请在下面查看: 构建服务
And I think the major task is Build Services and PublishServices So, please take a look below: Build Services
PublishServices
PublishServices
最后,在Azure容器注册表中,我有:
And finally, in Azure Container Registry I have:
因此,问题是如何将其部署到WebApp.我尝试右键单击api:最新存储库并部署到WebApp,但端点不响应
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
推荐答案
VSTS有2个步骤:构建和发布.看来您的构建部分还可以.因此,您的docker映像已推送到您的存储库中.然后,您必须在VSTS中配置构建部件,该部件将获取您刚刚在存储库中推送的映像并将其部署在服务器上.
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
这篇关于VSTS将docker-compose推送到Azure容器注册表和WebApp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!