[英]Azure app service - docker container - take latest build after CI/CD
Through VSTS we have created CI/CD pipeline for a project, in which the end product is a docker image, which will be placed in a azure container registry. 通过VSTS,我们为项目创建了CI / CD管道,其中最终产品是docker映像,它将被放置在azure容器注册表中。
In the azure app service, we have a linux container based service plan, which hosts the above placed latest image. 在azure应用程序服务中,我们有一个基于linux容器的服务计划,该计划承载上面放置的最新图像。
However, in the docker container, although we have enabled continuous deployment, the latest version is not taken, it is hosting the same older version of image. 但是,在Docker容器中,尽管我们启用了连续部署,但并未采用最新版本,而是托管了相同的旧版本映像。
How to deploy the latest docker image in app service container ? 如何在应用程序服务容器中部署最新的docker映像?
Azure Container Registry webhooks can be used to automatically update your application running on Azure App Services that run your container applications. Azure容器注册表webhooks可用于自动更新在运行容器应用程序的Azure App Services上运行的应用程序。
Setup your image to deploy to your Azure Web App on Linux as per the instruction at https://docs.microsoft.com/en-us/azure/app-service-web/app-service-linux-using-custom-docker-image#how-to-use-a-docker-image-from-a-private-image-registry 按照https://docs.microsoft.com/en-us/azure/app-service-web/app-service-linux-using-custom-docker中的说明设置映像以将其部署到Linux上的Azure Web App #image#如何使用私人图像注册表中的docker图像
In the App Settings section of your Web Application, add an app setting called DOCKER_ENABLE_CI with the value true. 在Web应用程序的“应用程序设置”部分中,添加一个名为DOCKER_ENABLE_CI的应用程序设置,其值为true。
Create a web hook in your registry and provide the docker callback uri which is of the form https://:@.scm.azurewebsites.net/docker/hook https://:@.scm.azurewebsites.net/docker/hook 在注册表中创建一个Web钩子,并提供形式为https://:@ .scm.azurewebsites.net / docker / hook https://:@ .scm.azurewebsites.net / docker / hook的docker回调uri
Eg https://github.com/sajayantony/appservicedemo 例如https://github.com/sajayantony/appservicedemo
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.