az acr

Manage Azure Container Registries.

Commands

az acr check-name Checks if a container registry name is available for use.
az acr create Creates a container registry.
az acr credential Manage login credentials for Azure Container Registries.
az acr credential renew Regenerate login credentials for a container registry.
az acr credential show Get the login credentials for a container registry.
az acr delete Deletes a container registry.
az acr list Lists all the container registries under the current subscription.
az acr login Log in to a container registry through Docker.
az acr replication Manage replications for Azure Container Registries.
az acr replication create Create a replication for a container registry.
az acr replication delete Delete a replication from a container registry.
az acr replication list List all of the replications for a container registry.
az acr replication show Get the details of a replication.
az acr replication update Updates a replication.
az acr repository Manage repositories for Azure Container Registries.
az acr repository delete Delete a repository, manifest, or tag in a container registry.
az acr repository list List repositories in a container registry.
az acr repository show-manifests Show manifests of a repository in a container registry.
az acr repository show-tags Show tags for a repository in a container registry.
az acr show Get the details of a container registry.
az acr show-usage Get the quota usages for a container registry.
az acr update Update a container registry.
az acr webhook Manage webhooks for Azure Container Registries.
az acr webhook create Create a webhook for a container registry.
az acr webhook delete Delete a webhook from a container registry.
az acr webhook get-config Get the service URI and custom headers for the webhook.
az acr webhook list List all of the webhooks for a container registry.
az acr webhook list-events List recent events for a webhook.
az acr webhook ping Trigger a ping event for a webhook.
az acr webhook show Get the details of a webhook.
az acr webhook update Update a webhook.

az acr check-name

Checks if a container registry name is available for use.

az acr check-name --name

Examples

Check if a registry name already exists.

az acr check-name -n doesthisnameexist

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

az acr create

Creates a container registry.

az acr create --name
--resource-group
--sku {Basic, Classic, Premium, Standard}
[--admin-enabled {false, true}]
[--location]
[--storage-account-name]

Examples

Create a managed container registry with the Standard SKU.

az acr create -n MyRegistry -g MyResourceGroup --sku Standard

Create a container registry with a new storage account with the Classic SKU.

az acr create -n MyRegistry -g MyResourceGroup --sku Classic

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--sku

The SKU of the container registry.

accepted values: Basic, Classic, Premium, Standard

Optional Parameters

--admin-enabled

Indicates whether the admin user is enabled.

accepted values: false, true
default value: false
--location -l

Location. You can configure the default location using az configure --defaults location=<location>.

--storage-account-name

Provide the name of an existing storage account if you're recreating a container registry over a previous registry created storage account. Only applicable to Classic SKU.

az acr delete

Deletes a container registry.

az acr delete --name
[--resource-group]

Examples

Delete a container registry.

az acr delete -n MyRegistry

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr list

Lists all the container registries under the current subscription.

az acr list [--resource-group]

Examples

List container registries and show the results in a table.

az acr list -o table

List container registries in a resource group and show the results in a table.

az acr list -g MyResourceGroup -o table

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr login

Log in to a container registry through Docker.

az acr login --name
[--password]
[--resource-group]
[--username]

Examples

Log in to a container registry

az acr login -n MyRegistry

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--password -p

The password used to log into a container registry.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--username -u

The username used to log into a container registry.

az acr show

Get the details of a container registry.

az acr show --name
[--resource-group]

Examples

Get the login server for a container registry.

az acr show -n MyRegistry --query loginServer

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr show-usage

Get the quota usages for a container registry.

az acr show-usage --name
[--resource-group]

Examples

Get the quota usages for a container registry.

az acr show-usage -n MyRegistry

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az acr update

Update a container registry.

az acr update --name
[--add]
[--admin-enabled {false, true}]
[--remove]
[--resource-group]
[--set]
[--sku {Basic, Classic, Premium, Standard}]
[--storage-account-name]
[--tags]

Examples

Update tags for a container registry.

az acr update -n MyRegistry --tags key1=value1 key2=value2

Update the storage account for a container registry.

az acr update -n MyRegistry --storage-account-name MyStorageAccount

Enable the administrator user account for a container registry.

az acr update -n MyRegistry --admin-enabled true

Required Parameters

--name -n

The name of the container registry. You can configure the default registry name using az configure --defaults acr=<registry name>.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--admin-enabled

Indicates whether the admin user is enabled.

accepted values: false, true
--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--sku

The SKU of the container registry.

accepted values: Basic, Classic, Premium, Standard
--storage-account-name

Provide the name of an existing storage account if you're recreating a container registry over a previous registry created storage account. Only applicable to Classic SKU.

--tags

Space separated tags in 'key[=value]' format. Use "" to clear existing tags.