Lesson 1 of 4 Azure Container Services

Storing Images in Azure Container Registry

This lesson explains registry tiers, how images are added and how services authenticate to pull them.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish between the Basic, Standard and Premium tiers.
  • Describe the ways to add images to a registry.
  • Explain how managed identities and RBAC roles control registry access.

Registries and service tiers

A registry is created with a globally unique name, which forms its login server name.azurecr.io, in a region and a service tier. Images are stored in repositories and identified by tags, such as contoso.azurecr.io/web/frontend:1.4, or by digest. Registries also store Helm charts and other OCI artifacts. The tiers differ in storage, throughput and features, as summarized below.

Basic
Included storage and throughputLowest
Geo-replicationNo
Private endpoints, IP rulesNo
Availability zone redundancyYes (supported regions)
Choose when Learning and development
Standard
Included storage and throughputHigher
Geo-replicationNo
Private endpoints, IP rulesNo
Availability zone redundancyYes (supported regions)
Choose when Most production workloads
Premium
Included storage and throughputHighest
Geo-replicationYes
Private endpoints, IP rulesYes
Availability zone redundancyYes (supported regions)
Choose when Global, high-volume or network-isolated workloads

Geo-replication in Premium keeps one registry replicated to several regions, so deployments in each region pull images locally with a single login server name. The tier can be changed later.

The following diagram shows a container registry with a replica in a second region and how Container Apps in each region pull images privately.

A registry for Container Apps in two regions with private access and no stored passwords. The Premium tier adds a geo-replica in East US so pulls stay local; private endpoints in each region's VNet replace public access; and each Container Apps environment or app pulls with a managed identity holding AcrPull. The admin user would store a shared password.
The scenario is illustrative.
Scenario questions

Choosing a registry tier

Exam skills 3.3.1

Choose the Azure Container Registry tier for each requirement.

Log in to try this activity Interactive activities are free with an account.

Adding images

Images reach a registry in three ways. A developer runs az acr login --name contoso and then docker tag and docker push. az acr import copies an image from another registry, such as Docker Hub or another Azure registry, server-side without Docker. ACR Tasks build images in Azure from a Dockerfile with az acr build, and can rebuild automatically on source commits or base image updates.

az acr create --resource-group rg-containers --name contosoacr104 --sku Standard
az acr import --name contosoacr104 --source mcr.microsoft.com/azuredocs/aci-helloworld:latest --image hello:v1
az acr build --registry contosoacr104 --image web:v2 .
az acr repository list --name contosoacr104 --output table
Match the pairs

Getting images into a registry

Exam skills 3.3.1

Match each task with the command that does it.

Log in to try this activity Interactive activities are free with an account.

Authentication and access

Access uses Microsoft Entra ID and Azure RBAC. AcrPull lets a principal pull images, AcrPush pull and push, and AcrDelete delete. Services pull with a managed identity that has AcrPull on the registry, which is the recommended method for App Service, Container Apps, Container Instances and AKS. A service principal suits external automation. The admin user is a single shared account with two passwords, disabled by default, intended only for testing or tools that cannot use Microsoft Entra ID. Repository-scoped tokens grant access to specific repositories.

Registry management includes retention policies and az acr run purge tasks to delete old or untagged images, image signing with the Notary Project (Docker Content Trust is deprecated and is removed on 31 March 2028), and Microsoft Defender for Containers vulnerability scanning.

Sort into groups

Choosing registry access

Exam skills 3.3.1

Choose the role or method that fits each client.

Log in to try this activity Interactive activities are free with an account.
Worked example

Images for two regions

A company runs Container Apps in West Europe and East US that pull the same images. Pulls from East US are slow, and the security team requires that the registry be reachable only through private endpoints and that no passwords be stored. What should you configure?

Upgrade the registry to Premium, add a geo-replication to East US, and create private endpoints in each region's VNet with public access disabled. Give each Container Apps environment or app a managed identity with the AcrPull role. The admin user would store a shared password, and Standard does not support geo-replication or private endpoints.

Check yourself

Which role should a managed identity have to pull images from a registry?

Show answer

AcrPull.

Exam Tips

Remember for the exam

  • Geo-replication and private endpoints require Premium.
  • Pull with a managed identity that has AcrPull; keep the admin user disabled.
  • Copy an image from another registry without Docker: az acr import.
  • Build images in Azure: ACR Tasks with az acr build.