Skip to content

Commit 630b83a

Browse files
authored
Merge pull request #53081 from MicrosoftDocs/NEW-store-manage-containers-azure-container-registry
New store manage containers azure container registry module
2 parents 6bc41a4 + 55c1522 commit 630b83a

15 files changed

Lines changed: 725 additions & 0 deletions
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.store-manage-containers-azure-container-registry.introduction
3+
title: Introduction
4+
metadata:
5+
title: Introduction
6+
description: Introduction
7+
ms.date: 01/05/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 3
12+
content: |
13+
[!include[](includes/1-introduction.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.store-manage-containers-azure-container-registry.image-storage
3+
title: Registries, repositories, and artifacts
4+
metadata:
5+
title: Registries, Repositories, and Artifacts
6+
description: Registries, repositories, and artifacts
7+
ms.date: 01/05/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 8
12+
content: |
13+
[!include[](includes/2-image-storage.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.store-manage-containers-azure-container-registry.build-run-acr-tasks
3+
title: Build and run images with ACR Tasks
4+
metadata:
5+
title: Build and Run Images with ACR Tasks
6+
description: Build and run images with ACR Tasks
7+
ms.date: 01/05/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 10
12+
content: |
13+
[!include[](includes/3-build-run-acr-tasks.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.store-manage-containers-azure-container-registry.tag-version-images
3+
title: Tag and version images
4+
metadata:
5+
title: Tag and Version Images
6+
description: Tag and version images
7+
ms.date: 01/05/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 8
12+
content: |
13+
[!include[](includes/4-tag-version-images.md)]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.store-manage-containers-azure-container-registry.exercise-build-manage-acr-tasks
3+
title: Exercise - Build and manage a container image with ACR Tasks
4+
metadata:
5+
title: Exercise - Build and Manage a Container Image with ACR Tasks
6+
description: Exercise - Build and manage a container image with ACR Tasks
7+
ms.date: 01/05/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 30
12+
content: |
13+
[!include[](includes/5-exercise-build-manage-acr-tasks.md)]
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.store-manage-containers-azure-container-registry.module-assessment
3+
title: Module assessment
4+
metadata:
5+
title: Module Assessment
6+
description: Module assessment
7+
ms.date: 01/05/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 5
12+
content: |
13+
quiz:
14+
questions:
15+
- content: "Your team builds container images on developer workstations, leading to inconsistent results. You need to ensure all images are built in a controlled environment. Which Azure Container Registry feature addresses this requirement?"
16+
choices:
17+
- content: "ACR Tasks quick build"
18+
isCorrect: true
19+
explanation: "ACR Tasks quick build offloads image building to Azure, providing a consistent cloud environment that eliminates 'works on my machine' problems. Quick tasks use the az acr build command to build images in a controlled Azure environment."
20+
- content: "Geo-replication"
21+
isCorrect: false
22+
explanation: "Geo-replication distributes images across multiple Azure regions for faster pulls but doesn't affect how images are built."
23+
- content: "Repository namespaces"
24+
isCorrect: false
25+
explanation: "Repository namespaces organize images using forward-slash notation for logical grouping. They help with access control and organization but don't affect how images are built."
26+
- content: "You need to deploy a container image to production and ensure every node in your Kubernetes cluster runs the exact same image version, even if someone pushes a new image with the same tag. How should you reference the image?"
27+
choices:
28+
- content: "By manifest digest"
29+
isCorrect: true
30+
explanation: "Manifest digests are immutable SHA-256 hashes that uniquely identify an image regardless of tags. Pulling by digest guarantees you get the exact image, even if someone pushes a new image with the same tag."
31+
- content: "By the latest tag"
32+
isCorrect: false
33+
explanation: "The latest tag can change whenever a new image is pushed without specifying a tag. This makes deployments unpredictable and can result in different nodes running different image versions."
34+
- content: "By semantic version tag"
35+
isCorrect: false
36+
explanation: "Semantic version tags like v1.2.0 can be overwritten with new images. While this is less common than overwriting latest, only digests provide guaranteed immutability."
37+
- content: "Your AI application depends on a base image containing PyTorch. When the PyTorch team releases security patches to the base image, you want your application image to rebuild automatically. Which ACR Tasks trigger type provides this capability?"
38+
choices:
39+
- content: "Base image update trigger"
40+
isCorrect: true
41+
explanation: "Base image update triggers detect changes to parent images and automatically rebuild dependent images. This capability keeps your application images current with security patches in base images."
42+
- content: "Source code commit trigger"
43+
isCorrect: false
44+
explanation: "Source code triggers respond to commits in your application's Git repository. They don't detect changes to base images in the registry."
45+
- content: "Scheduled trigger"
46+
isCorrect: false
47+
explanation: "Scheduled triggers run at fixed intervals using cron expressions. While they can periodically rebuild images, they don't respond immediately to base image updates."
48+
- content: "You're implementing a tagging strategy for production deployments. Your requirements include traceability to the source code commit and the ability to roll back to any previous version. Which tagging pattern best meets these requirements?"
49+
choices:
50+
- content: "Unique tags with Git commit SHA"
51+
isCorrect: true
52+
explanation: "Unique tags with Git commit SHA provide direct traceability to source code and guarantee each build is distinct for rollback. The immutable nature of unique tags ensures you can reference any specific build."
53+
- content: "Stable tags like v1 and v2"
54+
isCorrect: false
55+
explanation: "Stable tags are reused across multiple image pushes, causing the tag to point to new images over time. This approach doesn't preserve previous versions for rollback."
56+
- content: "Using only the latest tag"
57+
isCorrect: false
58+
explanation: "The latest tag provides no version tracking or rollback capability. It changes with each push and can't reference specific builds."
59+
- content: "You deployed a critical AI inference API to production and need to prevent the container image from being accidentally deleted. Which ACR feature should you use?"
60+
choices:
61+
- content: "Image locking with write-enabled false"
62+
isCorrect: true
63+
explanation: "Setting write-enabled to false locks the image to prevent deletion or modification. Locked images remain available even when retention policies run, ensuring production deployments are protected."
64+
- content: "Repository namespaces"
65+
isCorrect: false
66+
explanation: "Repository namespaces organize images using forward-slash notation but don't provide protection against deletion. Any image in a namespace can still be deleted by users with appropriate permissions."
67+
- content: "Geo-replication"
68+
isCorrect: false
69+
explanation: "Geo-replication creates copies of images across regions for faster pulls. However, deleting an image in one region removes it from all replicated regions, so it doesn't protect against accidental deletion."
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### YamlMime:ModuleUnit
2+
uid: learn.wwl.store-manage-containers-azure-container-registry.summary
3+
title: Summary
4+
metadata:
5+
title: Summary
6+
description: Summary
7+
ms.date: 01/05/2026
8+
author: jeffkoms
9+
ms.author: jeffko
10+
ms.topic: unit
11+
durationInMinutes: 2
12+
content: |
13+
[!include[](includes/7-summary.md)]
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
AI applications require a secure, scalable location to store container images that serve inference APIs, data pipelines, and backend services. This module guides you through using Azure Container Registry (ACR) to store, build, and manage container images for AI solutions on Azure.
2+
3+
Imagine you're a developer building an AI inference service that processes customer requests in real time. Your team maintains several container images: a model serving API, a preprocessing service, and a monitoring sidecar. Each image requires updates as models improve and dependencies change. Currently, your team builds images locally and pushes them from developer workstations, leading to inconsistent builds and unclear versioning. Your client expects reliable deployments with traceable image versions and the ability to roll back to previous releases. You need a centralized registry that supports cloud-based builds, enforces consistent tagging, and integrates with your deployment pipelines.
4+
5+
## Learning objectives
6+
7+
After completing this module, you'll be able to:
8+
9+
- Explain how Azure Container Registry organizes images using registries, repositories, and artifacts
10+
- Build and manage container images in the cloud using ACR Tasks
11+
- Implement tagging and versioning strategies for reliable container deployments
12+
- Use the Azure CLI to manage container images and run ACR quick tasks
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
Understanding how Azure Container Registry (ACR) organizes container images helps you design an effective storage strategy for AI applications. This unit explains the registry hierarchy and shows how manifests, layers, and digests enable efficient storage and retrieval of container artifacts.
2+
3+
## Understand Azure Container Registry
4+
5+
Azure Container Registry is a managed, private Docker registry service that stores and distributes container images and related artifacts. Unlike public registries such as Docker Hub, ACR provides direct control over access, geo-replication for global distribution, and integration with Azure services like Azure Kubernetes Service and Azure Container Apps.
6+
7+
For AI workloads, ACR offers several important capabilities:
8+
9+
- **Private storage:** Keep model serving images, preprocessing containers, and inference APIs secure within your Azure environment
10+
- **Geo-replication:** Distribute images close to deployment regions for faster pulls and reduced latency
11+
- **Integration:** Connect directly to Azure Kubernetes Service, Azure Container Apps, and Azure App Service for seamless deployments
12+
- **Content formats:** Store Docker images, Helm charts, and OCI artifacts in a single registry
13+
14+
ACR supports Basic, Standard, and Premium service tiers. Most developer workflows work identically across tiers, though features like content trust and private endpoints require Premium tier. The Basic tier works well for development and learning scenarios. Standard adds more storage and throughput for production workloads. Premium includes geo-replication, private endpoints, and content trust for enterprise deployments.
15+
16+
## Registry hierarchy
17+
18+
ACR uses a three-level hierarchy to organize content. Understanding this structure helps you plan how to arrange images for your AI applications.
19+
20+
### Registry
21+
22+
The registry is the top-level resource that hosts all container content. Each registry has a unique login server URL in the format `<registry-name>.azurecr.io`. When you create a registry, you choose a name that becomes part of this URL. For example, a registry named `contosoinference` has the login server `contosoinference.azurecr.io`.
23+
24+
A registry contains multiple repositories and provides authentication, access control, and management capabilities. You can configure who has access to push and pull images, set retention policies, and enable features like geo-replication at the registry level.
25+
26+
### Repository
27+
28+
A repository is a collection of container images with the same name but different tags. For example, a repository named `inference-api` contains all versions of your inference API image. Each time you push a new version with a different tag, it appears in the same repository.
29+
30+
Repositories support namespaces using forward slashes for organization. This feature lets you group related images logically:
31+
32+
- `production/inference-api` for production-ready images
33+
- `staging/inference-api` for images under validation
34+
- `ml-team/model-server` for team-specific images
35+
36+
Namespaces help with access control. You can grant a team permission to push images only to their namespace while restricting access to production images.
37+
38+
### Artifact
39+
40+
An artifact is the actual container image or other content stored in a repository. Each artifact has tags that identify it, layers that make up its content, and a manifest that describes its structure. Artifacts can include Docker images, Helm charts, or any OCI-compliant content.
41+
42+
## Tags, layers, and manifests
43+
44+
Each component of an artifact serves a specific purpose. Understanding these components helps you make informed decisions about image management.
45+
46+
### Tags
47+
48+
Tags identify specific versions of an artifact within a repository. The format `repository:tag` provides a human-readable reference. For example, `inference-api:v1.2.0` refers to version 1.2.0 of the inference API image. If you push or pull without specifying a tag, Docker uses `latest` by default.
49+
50+
A single artifact can have multiple tags pointing to it. You might tag an image as both `inference-api:v1.2.0` and `inference-api:stable` to indicate it's the current stable release. Both tags reference the same underlying image.
51+
52+
Tags are mutable. When you push a new image with an existing tag, the tag moves to point to the new image. This behavior is useful for tags like `latest` but can cause problems in production deployments where consistency matters.
53+
54+
### Layers
55+
56+
Container images consist of one or more layers. Each layer corresponds to an instruction in the Dockerfile that modifies the filesystem. For example, installing a package or copying files creates a new layer. Layers are content-addressable, meaning you can identify them by a hash of their content.
57+
58+
ACR shares common layers across images, reducing storage costs and speeding up pulls. When multiple images share a base layer such as `python:3.11`, only one copy exists in the registry. This deduplication is valuable for AI applications where many images might share common ML framework layers.
59+
60+
### Manifests
61+
62+
Every artifact has a manifest that lists its layers and configuration. The manifest is identified by a SHA-256 digest in the format `sha256:abc123...`. Unlike tags, digests are immutable. Once an image is pushed, its digest never changes.
63+
64+
Pulling by digest guarantees you get the exact image you expect, even if someone pushes a new image with the same tag. This immutability is critical for production AI deployments where you need consistency across all nodes.
65+
66+
## Address artifacts for push and pull operations
67+
68+
ACR supports two addressing formats for pushing and pulling images. Each approach has different use cases.
69+
70+
### By tag
71+
72+
Tag-based addressing uses the format `registry/repository:tag`. This approach provides human-readable references that are easy to remember and use in deployment configurations.
73+
74+
```azurecli
75+
# Pull an image by tag
76+
docker pull myregistry.azurecr.io/inference-api:v1.2.0
77+
78+
# Push an image with a tag
79+
docker push myregistry.azurecr.io/inference-api:v1.2.0
80+
```
81+
82+
Tag-based addressing works well during development and for images where you want to receive automatic updates. However, tags can change, so deployments using tags might not be perfectly reproducible.
83+
84+
### By digest
85+
86+
Digest-based addressing uses the format `registry/repository@sha256:hash`. This approach guarantees you reference a specific, immutable image regardless of tag changes.
87+
88+
```azurecli
89+
# Pull an image by digest
90+
docker pull myregistry.azurecr.io/inference-api@sha256:0a2e01852872580b2c2fea9380ff8d7b637d3928783c55beb3f21a6e58d5d108
91+
```
92+
93+
Pull by digest when you need guaranteed reproducibility. Production deployments where consistency across nodes is critical should use digests. You can find an image's digest in the Azure portal, through the Azure CLI, or in the output when pushing an image.
94+
95+
## Best practices for organizing registries
96+
97+
Following these practices helps you maintain an organized and efficient registry:
98+
99+
- **Use namespaces:** Organize repositories by team, environment, or project using forward-slash notation. This structure simplifies access control and makes it easier to find related images.
100+
- **Plan repository structure:** Group related images logically. Consider whether images belong together based on deployment patterns, team ownership, or lifecycle management needs.
101+
- **Enable geo-replication:** For global AI deployments, replicate images to regions where your services run. This reduces pull latency and improves deployment reliability.
102+
- **Monitor storage:** Track storage consumption and implement retention policies to remove untagged manifests. Container images accumulate over time, and cleanup policies prevent unnecessary storage costs.
103+
104+
## Additional resources
105+
106+
- [About registries, repositories, and artifacts](/azure/container-registry/container-registry-concepts)
107+
- [Azure Container Registry service tiers](/azure/container-registry/container-registry-skus)
108+
- [Best practices for Azure Container Registry](/azure/container-registry/container-registry-best-practices)

0 commit comments

Comments
 (0)