You are on page 1of 1

1.

Objective – Create a container image by using a Dockerfile and publish an


image to the Azure Container Registry
1. Select Home > Resource groups, then choose your resource group, such as oreilly-az300
2. At the top of the resource group window select + Add, search for and select “container
registry”, then choose Create. Enter the following configuration information. If not noted
below, use the defaults:

Resource group: oreilly-az300

Key Vault name: acrwestus<yourinitials-or-random-value>

Region: West US

SKU: Standard

3. When ready, select Create


4. If needed, select the notification bell in the top right-hand corner to view deployment
progress as the key vault is created. It takes a minute or two to create the key vault.
5. When ready, select Go to resource
6. Open the Azure Cloud Shell across the top of the portal, or in a new browser tab or window
go to https://shell.azure.com
7. Clone, or copy, a sample Dockerfile from GitHub by typing the following command into the
Cloud Shell prompt:

git clone https://github.com/fouldsy/oreilly-az300-crash-course.git

8. Change into the cloned GitHub directory using the following command:
cd oreilly-az300-crash-course/docker
9. Now use the Azure CLI to build a container image from a Dockerfile using Azure Container
Registry Tasks. When the image is built, it’s pushed to your registry. Enter your own registry
name, such as acrwestus<yourinitials-or-random-value>:

az acr build --registry acrwestus<yourinitials-or-random-value> --image az300training:v1


.

You might also like