简体   繁体   English

Azure DevOps -- 使用Docker-Compose任务部署到Azure容器实例

[英]Azure DevOps -- using Docker-Compose task to deploy to Azure Container Instances

I am trying to create a CI/CD pipeline for a multi-container solution implemented via docker-compose.yml.我正在尝试为通过 docker-compose.yml 实现的多容器解决方案创建 CI/CD 管道。 The goal is to run a container group in Azure Container Instances.目标是在 Azure 个容器实例中运行一个容器组。

I went with this task DockerCompose@0 for the release pipeline, and the steps to build containers and to deploy them to Azure Container Registry are straighforward.我为发布管道执行了DockerCompose@0任务,构建容器并将它们部署到 Azure Container Registry 的步骤非常简单。

But, I cannot figure out if it's possible to configure this task to deploy and run containers in ACI.但是,我不知道是否可以配置此任务以在 ACI 中部署和运行容器。 There is an option to Run the Images, but the images are run on the agent's docker host:有一个运行图像的选项,但图像在代理的 docker 主机上运行:

在此处输入图像描述

How do I instruct this task that the containers to be run in ACI?我如何指示容器在 ACI 中运行? I know there is a way to do that via Docker CLI with a step to connect to the ACI context, but I can't figure out how to switch to the ACI context from the DevOps pipeline.我知道有一种方法可以通过 Docker CLI 通过连接到 ACI 上下文的步骤来做到这一点,但我不知道如何从 DevOps 管道切换到 ACI 上下文。

How do I instruct this task that the containers to be run in ACI?我如何指示容器在 ACI 中运行?

Ans: The new release pipeline needs to start with an empty job and provide a name for the release definition. Ans:新的发布管道需要从一个空作业开始,并为发布定义提供一个名称。 Next, we need to add artefacts to our application.接下来,我们需要将人工制品添加到我们的应用程序中。 Since all we want to deploy is a Docker image located in the ACR, select the artefact type as the Azure Container Registry (ACR).由于我们要部署的只是位于 ACR 中的 Docker 映像,因此 select 工件类型为 Azure Container Registry (ACR)。

Here is the blog tutorial to Configure CI/CD for Azure Container Instances using Azure / Azure DevOps Pipelines given by @mohitgoyal.这是使用 Azure / Azure DevOps 管道为 Azure 容器实例配置 CI/CD 的博客教程,由 @mohitgoyal 提供。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法将 docker-compose 基础设施部署到 Azure 容器实例 - Can`t deploy docker-compose infrastructure to Azure Container Instances 使用 docker compose 将多个容器部署到 azure - Deploy several container to azure using docker compose 如何使用 Azure DevOps 将 docker 实例部署和管理到 Azure 中? - How to deploy and manage docker instances into Azure using Azure DevOps? 使用docker-compose将Azure容器注册表映像部署到Azure Web应用程序中 - Deploy azure container registry images into an azure web app with docker-compose 在 Azure 容器应用程序上部署 docker 组合 - Deploy docker compose on Azure Container App 运行 docker-compose 时出现 Azure DevOps Pipeline 错误 - Azure DevOps Pipeline error when running docker-compose up 在 azure 应用服务中使用 docker-compose - Using docker-compose in azure app service 在 azure devops 上创建管道以在 azure 应用服务上部署 docker 容器? - Create a pipeline on azure devops to deploy a docker container on azure app service? 如何在 azure 中使用 docker-compose 部署 graphql API - How can I deploy a graphql API with docker-compose in azure 如何使用 Docker-compose 文件在 Azure WebApp 上部署 Grafana? - How I deploy Grafana on Azure WebApp with Docker-compose file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM