I am building an Azure DevOps pipeline using a yml file.
In the yml definition I have two stages, one is to build docker images , second stage is to push these images to ACR. I am able to store docker image as build artifact in the first step. I can also download build artifact into $(Pipeline.Workspace). I could not find a way to push image from $(Pipeline.Workspace) to Container registry as docker save does not have parameter to reference $(Pipeline.Workspace) workspace directory.
- task: Docker@2
displayName: Push Image to Repository
inputs:
command: push