Manage Azure Container Registry via the az acr CLI including registries, images, cloud builds, ACR Tasks, authentication, tokens, geo-replication, and networking. Use when working with ACR, az acr commands, pushing/importing/purging container images in Azure, or when the user mentions Azure Container Registry.
Start a fresh conversation. Replace the highlighted placeholders.
Use azure-container-registry-cli to draft a safe ACR workflow for [registry and resource group] that [goal], favoring cloud builds or server-side imports where applicable and Microsoft Entra-based access rather than production admin credentials; do not execute it.
Required inputs
[registry and resource group]
[goal]
User-approved starter prompt based on a pinned source version; check current skill requirements before running. Task evidence ↗
SKILL.md
name: azure-container-registry-clidescription: 'Manage Azure Container Registry via the az acr CLI including registries, images, cloud builds, ACR Tasks, authentication, tokens, geo-replication, and networking. Use when working with ACR, az acr commands, pushing/importing/purging container images in Azure, or when the user mentions Azure Container Registry.'
Azure Container Registry CLI
Manage Azure Container Registry (ACR) resources using the az acr command group of the Azure CLI.
CLI:az acr ships with core Azure CLI — no extension required (the acrtransfer extension is only needed for export/import pipelines).
Prerequisites
# Install Azure CLI
brew install azure-cli # macOS
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash # Linux
winget install Microsoft.AzureCLI # Windows
# Sign in and select subscription
az login
az account set --subscription {subscription-id}
Quick Start
# Create a registry (SKU: Basic | Standard | Premium)
az acr create --resource-group {rg} --name {registry} --sku Standard
# Authenticate Docker/Podman against the registry
az acr login --name {registry}
# Build and push in the cloud — no local Docker needed
az acr build --registry {registry} --image app:v1 .
# Copy an image from another registry without pull/push
az acr import --name {registry} --source mcr.microsoft.com/hello-world:latest
# List repositories and tags
az acr repository list --name {registry} --output table
az acr repository show-tags --name {registry} --repository app --orderby time_desc
# Diagnose registry connectivity and configuration
az acr check-health --name {registry} --yes
Key Principles
Prefer az acr build / ACR Tasks over local docker build + docker push: builds run in Azure, work without a local daemon, and integrate with triggers.
Prefer az acr import to move images between registries: it is server-side, faster, and requires no local storage.
Never enable the admin user for production — use Microsoft Entra identities (RBAC roles AcrPull/AcrPush, or Container Registry Repository Reader/Writer on ABAC-enabled registries), repository-scoped tokens, or managed identities.
Premium-only features: geo-replication, private endpoints, retention policies, connected registries, agent pools. (Repository-scoped tokens work in all tiers; zone redundancy is automatic in all tiers in supported regions.)