Container Registry - az acr

Manage Azure Container Registries.

Commands

az acr check-name Checks whether the 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 Regenerates one of the login credentials for the specified container registry.
az acr credential show Gets the login credentials for the specified container registry.
az acr delete Deletes a container registry.
az acr list Lists all the container registries under the current subscription.
az acr login Login to a container registry through Docker.
az acr repository Manage repositories for Azure container registries.
az acr repository delete Deletes a repository or a manifest/tag from the given repository in the specified container registry.
az acr repository list Lists repositories in the specified container registry.
az acr repository show-manifests Shows manifests of a given repository in the specified container registry.
az acr repository show-tags Shows tags of a given repository in the specified container registry.
az acr show Gets the properties of the specified container registry.
az acr show-usage Gets the quota usages for the specified container registry.
az acr update Updates a container registry.
az acr webhook Manage webhooks for Azure container registries.
az acr webhook create Creates a webhook for a container registry.
az acr webhook delete Deletes a webhook from a container registry.
az acr webhook get-config Gets the configuration of service URI and custom headers for the webhook.
az acr webhook list Lists all the webhooks for the specified container registry.
az acr webhook list-events Lists recent events for the specified webhook.
az acr webhook ping Triggers a ping event to be sent to the webhook.
az acr webhook show Gets the properties of the specified webhook.
az acr webhook update Updates a webhook.

az acr check-name

Checks whether the 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=.

az acr create

Creates a container registry.

az acr create --name
--resource-group
--sku {Basic, Managed_Basic, Managed_Premium, Managed_Standard}
[--admin-enabled {false, true}]
[--location]
[--storage-account-name]

Examples

Create a managed container registry. Applicable to Managed SKU.

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

Create a container registry with a new storage account. Applicable to Basic SKU.

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

Required Parameters

--name -n

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

--resource-group -g

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

--sku

The SKU of the container registry.

accepted values: Basic, Managed_Basic, Managed_Premium, Managed_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=.

--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 Basic 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=.

Optional Parameters

--resource-group -g

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

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=.

az acr login

Login to a container registry through Docker.

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

Examples

Login 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=.

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=.

--username -u

The username used to log into a container registry.

az acr show

Gets the properties of the specified 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=.

Optional Parameters

--resource-group -g

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

az acr show-usage

Gets the quota usages for the specified 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=.

Optional Parameters

--resource-group -g

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

az acr update

Updates a container registry.

az acr update --name
[--add]
[--admin-enabled {false, true}]
[--remove]
[--resource-group]
[--set]
[--sku {Basic, Managed_Basic, Managed_Premium, Managed_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=.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty .

--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=.

--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, Managed_Basic, Managed_Premium, Managed_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 Basic SKU.

--tags

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