Exercise 3: Building and Pushing to ACR Using ACR Tasks
This exercise will guide you through the steps required to use ACR tasks to build and push a container image to ACR using a cloud-based agent and having none of the work occur on your local machine.
Task 1: Executing Build, Push, and Run Quick Tasks
Follow these steps to use the ACR CLI to run ACR tasks that build and push a container image to ACR, and run a container instance from within the ACR environment. Make sure you have your terminal session open in the 01-aspnetapp
directory used before that contains the Dockerfile:
- Run the ACR build quick task using the following:
az acr build --image webapp:v2 --registry "<registry name>" .
Note that the output shows everything you saw locally and additional information, including runtime and build-time dependencies.
- Confirm the new
v2
tag is in your repository with the following:az acr repository show-tags --name "<registry name>" --repository...