@@ -36,6 +36,8 @@ This reconfigures the `az` CLI to send commands to the official Azure management
3636
3737### Create a resource group
3838
39+ Create a resource group to hold all resources created in this guide:
40+
3941``` bash
4042az group create --name rg-acr-demo --location eastus
4143```
@@ -52,6 +54,8 @@ az group create --name rg-acr-demo --location eastus
5254
5355# ## Create a container registry
5456
57+ Create a Standard-tier Azure Container Registry:
58+
5559` ` ` bash
5660az acr create \
5761 --name myacrdemo \
@@ -77,12 +81,16 @@ az acr create \
7781
7882# ## Log in with Docker
7983
84+ Authenticate the local Docker daemon to the registry using the Azure CLI:
85+
8086` ` ` bash
8187az acr login --name myacrdemo
8288` ` `
8389
8490# ## Build and push an image
8591
92+ Build a local Docker image and push it to the registry endpoint:
93+
8694` ` ` bash
8795docker build -t myacrdemo.azurecr.io/hello:v1 .
8896docker push myacrdemo.azurecr.io/hello:v1
@@ -99,12 +107,16 @@ az acr build \
99107
100108# ## Pull an image
101109
110+ Pull the image back from the registry to confirm it was pushed correctly:
111+
102112` ` ` bash
103113docker pull myacrdemo.azurecr.io/hello:v1
104114` ` `
105115
106116# ## List repositories
107117
118+ List all image repositories stored in the registry:
119+
108120` ` ` bash
109121az acr repository list --name myacrdemo
110122` ` `
@@ -115,6 +127,8 @@ az acr repository list --name myacrdemo
115127
116128# ## Check name availability
117129
130+ Check that the registry name is globally available before creating:
131+
118132` ` ` bash
119133az acr check-name --name myacrdemo
120134` ` `
@@ -129,6 +143,8 @@ az acr check-name --name myacrdemo
129143
130144# ## Update registry settings
131145
146+ Enable the admin user account on the registry:
147+
132148` ` ` bash
133149az acr update --name myacrdemo --resource-group rg-acr-demo --admin-enabled false
134150` ` `
@@ -149,6 +165,8 @@ az acr update --name myacrdemo --resource-group rg-acr-demo --admin-enabled fals
149165
150166# ## Show registry usage
151167
168+ Show current storage usage statistics for the registry:
169+
152170` ` ` bash
153171az acr show-usage --name myacrdemo --resource-group rg-acr-demo
154172` ` `
@@ -166,6 +184,8 @@ az acr show-usage --name myacrdemo --resource-group rg-acr-demo
166184
167185# ## Delete and verify
168186
187+ Delete the resource and confirm it no longer appears in the list:
188+
169189` ` ` bash
170190az acr delete --name myacrdemo --resource-group rg-acr-demo --yes
171191az acr list --resource-group rg-acr-demo
0 commit comments