title: How to publish docker image as an artifact in azure devops
body: <p>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 <a href="https://stackoverflow.com/questions/61192774/accessing-docker-images-in-a-multi-stage-azure-devops">this</a> and <a href="https://github.com/MicrosoftDocs/azure-devops-docs/issues/3447" rel="nofollow noreferrer">this</a> 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:</p>
  <ol>
  <li>How will I use the <code>docker save</code> command in Azure pipeline task after docker build. The available docker task doesn't have this command.</li>
  <li>Is there any better way of doing this apart from saving an image.</li>
  </ol>