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 repository Manage repositories for Azure container registries.
az acr repository list Lists repositories 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 update Updates a container registry.

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.

az acr create

Creates a container registry.

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

Examples

Create a container registry with a new storage account.

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

Required Parameters

--name -n
The name of the container registry.
--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

Optional Parameters

--admin-enabled
Indicates whether the admin user is enabled.
accepted values: false, true
--location -l
Location. You can configure the default location using 'az configure --defaults location='.
--storage-account-name
Default: A new storage account will be created. Provide the name of an existing storage account if you're recreating a container registry over a previous registry created storage account.

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.

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

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]
[--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.

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=.
--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.
--tags
Space separated tags in 'key[=value]' format. Use "" to clear existing tags.