Domain 1 β€” Module 2 of 8 25%
2 of 27 overall
Domain 1: Develop containerized solutions on Azure Free ⏱ ~12 min read

Azure Container Registry: Build, Store, Version, Manage

Where every container image you ship to production lives. ACR tiers, repositories, tags, content trust, geo-replication, and how managed identity replaces admin credentials.

What ACR actually does

Simple explanation

Azure Container Registry is a private library for your container images. Docker Hub is a public library β€” anyone can read most of it. ACR is yours: you push your AI inference image, your front-end image, your worker image β€” they sit in your subscription, behind your network rules, with your access policies.

An ACR has repositories (one per app, like roo-vision) and inside each repository, tags mark versions (:v3.4.1, :latest). When App Service or Container Apps starts your app, it pulls the right tag from ACR.

The exam expects you to know how to push images, how to version them sensibly, how to let Azure compute services pull them without secrets, and which ACR tier supports which features.

ACR SKUs β€” which tier to pick

ACR pricing tiers. Premium is required for geo-replication, content trust, and private network access.
FeatureBasicStandardPremium
Storage10 GB100 GB500 GB included, scales further
Webhooks per registry210500
Geo-replicationNoNoYes β€” replicate to any Azure region
Content trust (image signing)NoNoYes (Notation v2 / Notary)
Private endpoints / VNetNoNoYes
Customer-managed keysNoNoYes
Best forDev sandboxes, demosMost production workloads (single region)Multi-region, regulated, supply-chain hardened
Exam tip: 'geo-replication' = Premium

Whenever a question mentions β€œlow-latency pulls in multiple Azure regions” or β€œthe registry must be available in another region for failover”, the answer involves ACR Premium. Standard cannot replicate. This is one of the most common single-fact gotchas in container questions.

Tags, digests, and how to version sensibly

A tag is a human-readable pointer; a digest is a cryptographic hash. The same image can have many tags pointing to it, but exactly one digest.

# Same image, two views:
roo-vision:v3.4.1
roo-vision@sha256:7e2b1c...   # immutable digest
PracticeWhy
Push every release as a unique semver tag (:v3.4.1)Lets you pin and roll back without ambiguity
Also push :latestConvenient for dev, but never rely on it in production manifests
Pin production deployments by digestA tag can be reassigned; a digest cannot. Eliminates β€œbut it worked yesterday”
Lock images with az acr repository update --image roo-vision:v3.4.1 --write-enabled falsePrevents the tag from being overwritten
Real-world example: Theo locks audited builds

Tidewater Health’s compliance team must be able to prove that the inference image running today is the same one the security team scanned six weeks ago.

Theo’s pipeline:

  1. ACR Tasks builds the image and tags it :v2.7.0 and the SHA digest is recorded.
  2. The security scan runs against tidewater-rag@sha256:abc... (digest).
  3. After approval, Theo runs az acr repository update --image tidewater-rag:v2.7.0 --write-enabled false β€” the tag is now immutable.
  4. AKS manifests reference the digest, not the tag. Future image rebuilds cannot silently replace what’s running.

Authenticating to ACR β€” the four options

MethodWhen to useNotes
Microsoft Entra ID user / service principalCI/CD pipelines, individual developersUse az acr login β€” uses your Entra token, no admin password
Managed identity (system or user-assigned)App Service, Container Apps, AKS, Functions, Container Instances pulling imagesRecommended. Zero secrets in your app. Assign the identity AcrPull role on the registry
ACR token with scope mapLimited automation that needs read-only pull from one repoTokens are scoped per repository, can be disabled
Admin userQuick demos onlyDisabled by default in production. Single shared credential β€” breaks audit trails

The exam strongly favours managed identity. If a question shows a long-lived password or shared admin user as one of four options, that’s almost certainly the wrong answer.

# Grant a Container App's managed identity AcrPull on the registry:
az role assignment create \
  --assignee $PRINCIPAL_ID \
  --role AcrPull \
  --scope $(az acr show -n roo --query id -o tsv)

Repositories, untagged manifests, and cleanup

A repository can grow forever β€” every push creates a new manifest. Untagged manifests (orphaned by tag overwrites) accumulate quickly.

# Show repositories
az acr repository list --name roo

# Show all tags + digests in a repo
az acr repository show-manifests --name roo --repository roo-vision

# Remove untagged manifests older than 7 days
az acr run --registry roo --cmd \
  "acr purge --filter 'roo-vision:.*' --untagged --ago 7d" /dev/null

Set up a retention policy on Premium registries to auto-delete untagged manifests older than N days. Storage cost compounds fast on large model images (several GB each).

Content trust and image signing

For workloads that must prove image provenance, Premium ACR supports image signing with Notation v2 (the modern successor to Docker Content Trust). Signed images carry a verifiable signature that downstream consumers (AKS gatekeeper, container apps, Defender for Containers) can validate.

StepToolNotes
Generate a signing certificateAzure Key VaultThe signing key never leaves Key Vault
Sign on pushnotation sign $(az acr login -n roo --expose-token)Signing is a separate manifest in the registry
Verify on pullNotation policy + Defender for ContainersReject unsigned or tampered images

Key terms

Question

What is the difference between a container image tag and a digest?

Click or press Enter to reveal answer

Answer

A tag is a mutable, human-readable label (`:v3.4.1`, `:latest`) that can be reassigned to a different image at any time. A digest is an immutable SHA256 hash of the image manifest β€” `@sha256:abc...`. Pin production deployments by digest, not tag.

Click to flip back

Question

Which ACR SKU supports geo-replication?

Click or press Enter to reveal answer

Answer

Premium only. Basic and Standard are single-region. Premium also adds private endpoints, customer-managed keys, and content trust.

Click to flip back

Question

What is the AcrPull role?

Click or press Enter to reveal answer

Answer

A built-in Azure role that grants permission to pull images from an Azure Container Registry. Assign it to a managed identity on App Service, Container Apps, AKS, or Functions to authenticate image pulls without storing passwords.

Click to flip back

Question

Should you enable the ACR admin user in production?

Click or press Enter to reveal answer

Answer

No. The admin user is a single shared credential that breaks audit trails and can't be scoped. Use Microsoft Entra ID + managed identity instead. The admin user exists for quick demos and emergency break-glass only β€” most production registries leave it disabled.

Click to flip back

Question

How do you eliminate untagged manifests from an ACR repository?

Click or press Enter to reveal answer

Answer

Run `acr purge --untagged --ago 7d` (often via ACR Tasks on a schedule) or configure a retention policy that auto-deletes untagged manifests after N days. Untagged manifests accumulate from tag overwrites and consume storage.

Click to flip back

Knowledge check

Knowledge Check

Mira at Roo Robotics needs to host the same vision-inference image close to warehouses in West Europe and Australia East to minimise pull latency during deployment. Which ACR SKU does she need?

Knowledge Check

Theo at Tidewater Health is finalising the AKS deployment and wants to remove the password the cluster currently uses to pull from ACR. What is the recommended approach?

Knowledge Check

Lin's pipeline pushes a new build and tags it `:v1.2`, overwriting the previous tag. Several App Service instances continue to run the old code for hours afterwards. What is happening, and what should Lin do?