az-acr
Manage Azure Container Registry
TLDR
Create a managed container registry
Login to a registry
Tag a local image for ACR
Push an image to a registry
Pull an image from a registry
Delete an image from a registry
Delete a managed container registry
List images within a registry
SYNOPSIS
az acr [subcommand] [--debug] [--help -h] [--only-show-errors] [--output -o table|tsv|json] [--query -q] [--subscription] [--verbose]
PARAMETERS
--debug
Increase logging verbosity to show all debug logs
--help -h
Show this help message and exit
--only-show-errors
Only show errors, suppressing warnings
--output -o
Output format: json|jsonc|table|tsv|yaml
--query -q
JMESPath query string to customize output
--subscription
Name or ID of Azure subscription
--verbose
Increase logging verbosity
DESCRIPTION
The az acr command group within the Azure Command-Line Interface (CLI) enables management of Azure Container Registry (ACR) resources. ACR provides a secure, private Docker-compatible registry for storing, building, and distributing container images and OCI artifacts.
Key capabilities include creating and deleting registries, listing and updating configurations, managing access via service principals, RBAC roles, or repository-scoped tokens, building images directly with az acr build, importing/exporting images, running ACR Tasks for CI/CD, enabling geo-replication, and integrating with tools like Azure Kubernetes Service (AKS) and GitHub Actions.
Common use cases involve DevOps pipelines on Linux systems, vulnerability scanning with Microsoft Defender for Containers, and Helm chart repositories. Requires Azure CLI v2.0+ installed (pip install azure-cli or package manager) and authentication via az login. Supports output formats like JSON for scripting.
Enhances container workflows by avoiding public registries like Docker Hub for enterprise security.
CAVEATS
Requires Azure CLI installation and az login authentication. Not all subcommands support all options; check az acr [subcommand] --help. Rate limits apply to ACR operations.
KEY SUBCOMMANDS
build, check-name, create, delete, import, list, login-server, repository, run, task, update
EXAMPLES
az acr create --resource-group myRG --name myacr01 --sku Basic
az acr build --registry myacr01 --image hello:v1 .
az acr repository list --name myacr01 --output table
HISTORY
Introduced in Azure CLI 2.0 (2017) with ACR general availability. Evolved with ACR features like Tasks (2018), premium SKUs, and OCI support (2020+). Aligns with Azure's container ecosystem growth.


