LinuxCommandLibrary

az-acr

Manage Azure Container Registries

TLDR

Create a container registry

$ az acr create -n [registry-name] -g [resource-group] --sku [Standard]
copy
Log in to a registry
$ az acr login -n [registry-name]
copy
List all registries in the subscription
$ az acr list -o table
copy
Build and push an image
$ az acr build -t [image:tag] -r [registry-name] [./source-directory]
copy
Import an image from another registry
$ az acr import -n [registry-name] --source [source-registry.azurecr.io/repo:tag]
copy
List repositories in a registry
$ az acr repository list -n [registry-name] -o table
copy
Show registry details
$ az acr show -n [registry-name]
copy
Check registry health
$ az acr check-health -n [registry-name]
copy

SYNOPSIS

az acr subcommand [options]

DESCRIPTION

az acr manages Azure Container Registries (ACR), a private Docker registry service for storing and managing container images. ACR integrates with Azure Kubernetes Service, App Service, and other Azure services.
The command group supports registry creation, image management, authentication, geo-replication, automated builds with ACR Tasks, and advanced features like artifact streaming and supply chain security.

PARAMETERS

-n, --name value

Name of the container registry
-g, --resource-group value
Name of the resource group
--sku value
Registry SKU: Basic, Standard, or Premium
-t, --image value
Image name and tag (name:tag format)
-r, --registry value
Registry name for build operations

SUBCOMMANDS

Registry Management

create, delete, update, show, list, show-usage, show-endpoints, check-name, check-health
Authentication
login, credential show, credential renew, token create, token delete
Image Operations
build, run, import, repository list, repository show-manifests, repository delete
Tasks
task create, task run, task list, task show, task update, task logs
Replication
replication create, replication delete, replication list, replication show
Advanced
webhook create, webhook list, private-endpoint-connection, config content-trust, manifest list-metadata

CAVEATS

Registry names must be globally unique and 5-50 characters. The Premium SKU is required for geo-replication and private endpoints. ACR Tasks pricing is based on compute time. Log in tokens expire after a period; use az acr login to refresh.

HISTORY

Azure Container Registry launched in 2017 as a managed Docker registry service. It has expanded to support Helm charts, OCI artifacts, and integrated security scanning with Microsoft Defender for Cloud.

SEE ALSO

az(1), az-aks(1), docker(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community