Build and Run a Container Using Azure ACR Tasks

15 minutes
  • 4 Learning Objectives

About this Hands-on Lab

Your manager asks you to run a container, but you don’t have Docker installed on your desktop. You’ve recently learned about Azure ACR Tasks built into Cloud Shell and decide to give it a try. Your goal is to create a new container registry and use ACR Tasks to build, push and run the container in Azure.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Start Cloud Shell
  1. Click the Cloud Shell icon (>_) in the upper right.
    1. Select Bash.
    2. Click Show advanced settings.
    3. Change Cloud Shell Region to the same region as the existing resource group.
    4. For Storage account, select Use existing.
    5. For File share, select Create new and give it a name of "fileshare".
    6. Click Create storage.
Create a New Container Registry
  1. In the Azure portal, click the listed resource group name.
  2. Copy it to your clipboard.
  3. Create a new container registry, replacing <RESOURCE_GROUP_NAME> with the name you just copied.
  4. Change the directory to clouddrive.
  5. Create a Dockerfile.
Build an Image and Push to ACR

Build and push the image to Azure Container Registry using the newly created Dockerfile.

Run the New Container

Run the container.

Additional Resources

Using Azure Cloud Shell, create a new container registry and a Dockerfile.

Using ACR Tasks, build the image from the Dockerfile and push it to the new container registry. Finally, run a container using the image.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?