Summary

Completed

In this module, you learned how to:

  • Describe Azure Container Registry as a private registry service for building, storing, and managing container images and related artifacts.
  • Create an Azure container registry instance with the Azure portal.
  • Sign in to the registry instance using the Azure CLI on your local machine.
  • Push an image to the registry instance.
  • Remove the registry-tagged local image reference from your local Docker environment.
  • View the image in your registry.
  • Pull and run the container image from your container registry.

Clean up resources

If you created a resource group solely for this module, delete it when you're finished. Replace <resource-group-name> with the name of that module-specific resource group. Don't use this command to delete shared or preexisting resource groups. Deleting the resource group deletes the container registry and its stored images.

az group delete --name <resource-group-name> --yes --no-wait

If you used a shared or pre-existing resource group, don't delete the resource group. Instead, clean up only the registry or sample image content you created.

To delete the container registry and everything stored in it, replace <registry-name> and <resource-group-name> and run:

az acr delete --name <registry-name> --resource-group <resource-group-name> --yes

If you want to keep the registry but remove the sample repository, delete the hello-world repository:

If your registry uses ABAC repository permissions, deleting the sample repository requires Container Registry Repository Contributor or equivalent repository delete permission. If you only have Container Registry Repository Writer, use the untag option instead.

az acr repository delete --name <registry-name> --repository hello-world --yes

Deleting the repository removes all manifests and tags under hello-world. Layer data that isn't referenced by any other manifest can also be removed.

If you want to keep the repository and remove only the v1 tag reference, untag the image:

az acr repository untag --name <registry-name> --image hello-world:v1

Untagging removes only the tag reference. It doesn't delete the manifest or layer data, and it doesn't free registry storage.

Learn more