How to publish docker image as an artifact in azure devops

Raman Balyan

I am building a Docker image in my Azure pipeline. Now, I want to push this image to multiple aws accounts(dev, stage, prod) depending on the configuration parameters. The problem is, image is not available in publish artifact. I came across this and this article during my research. I am confused about the solution regarding saving the docker image so it can be available in publish artifact. I have two specific questions:

  1. How will I use the docker save command in Azure pipeline task after docker build. The available docker task doesn't have this command.
  2. Is there any better way of doing this apart from saving an image.
Raman Balyan

After a lot of reserach I found this article which resolved my issue https://dev.to/n3wt0n/container-image-promotion-across-environments-build-artifact-5887

Note: We can manually add commands which are not present in the Docker task snippet available in Azure DevOps. This is also mentioned in the article and steps to do this.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to publish artifact into Azure Artifact

How to copy an Azure DevOps build artifact to a Docker image build in the same pipeline?

File pattern for Publish Pipeline Artifact in Azure DevOps

How to refer previous task and stop the build in azure devops if there is no new data to publish an artifact

How to Tag a Docker Image in Azure DevOps?

What is this cryptic artifact name created by the Publish Symbols Azure DevOps task?

azure devops: copy and publish build artifacts - rename artifact by buildnumber

Publish build artifact through build.cake instead of Azure Devops

Publish custom maven artifact/package (*.jar) to Azure artifact using azure DevOps pipeline

How to download an artifact in Azure DevOps artifacts

How to specify Artifact version name in Azure DevOps?

Is it possible to conditionally set the artifact name in my Azure DevOps build pipeline "publish artifact" task?

How do I Publish using Azure DevOps?

Azure Pipeline Publish Artifact - Artifact Name

Publish latest build artifact from "LOCAL" Jenkins to Azure DevOps Release Pipeline?

Dotnet publish on linux error in docker (Azure DevOps build)

When using Azure DevOps CI/CD for a Linux web app how can I zip and publish the build artifact as a zip file only instead of copying to directory

How to download a Azure-Devops Pipeline Artifact into a different pipeline

How to read directory path of the Artifact in Release pipeline in Azure DevOps?

How to show html report from Azure DevOps artifact in custom extension?

Azure Devops Kubernetes - how to upload .yaml file as Artifact

How do I send pipeline artifact by email in Azure DevOps?

How can I get a list of Azure DevOps Artifact consumers?

Azure Devops - Docker Compose Build Image Not Found

Azure DevOps copying .env file to docker image

Azure DevOps nuget artifact delay

Azure Devops - Can not retrieve artifact

How to run a docker image on Azure devops agent with docker task V2?

How to publish a asp.net 5 project in visual studio 2015 to a docker image or linux without azure