az acr repository

Manage repositories (image names) for Azure Container Registries.

Commands

az acr repository delete Delete a repository or image in an Azure Container Registry.
az acr repository list List repositories in an Azure Container Registry.
az acr repository show Get the attributes of a repository or image in an Azure Container Registry.
az acr repository show-manifests Show manifests of a repository in an Azure Container Registry.
az acr repository show-tags Show tags for a repository in an Azure Container Registry.
az acr repository untag Untag an image in an Azure Container Registry.
az acr repository update Update the attributes of a repository or image in an Azure Container Registry.

az acr repository delete

Delete a repository or image in an Azure Container Registry.

az acr repository delete --name
[--image]
[--password]
[--repository]
[--resource-group]
[--subscription]
[--suffix]
[--username]
[--yes]

Examples

Delete an image manifest by tag. This deletes the manifest referenced by 'hello-world:latest' and all other tags referencing the same manifest.

az acr repository delete -n MyRegistry --image hello-world:latest

Delete an image manifest by sha256-based manifest digest. This deletes the manifest identified by 'hello-world@sha256:abc123' and all tags referencing the manifest.

az acr repository delete -n MyRegistry --image hello-world@sha256:abc123

Delete a repository from an Azure Container Registry. This deletes all manifests and tags under 'hello-world'.

az acr repository delete -n MyRegistry --repository hello-world

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

--image -t

The name of the image. May include a tag in the format 'name:tag' or digest in the format 'name@digest'.

--password -p

The password used to log into a container registry.

--repository

The name of the repository.

--resource-group -g

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--suffix

The tenant suffix in registry login server. You may specify '--suffix tenant' if your registry login server is in the format 'registry-tenant.azurecr.io'. Applicable if you're accessing the registry from a different subscription or you have permission to access images but not the permission to manage the registry resource.

--username -u

The username used to log into a container registry.

--yes -y

Do not prompt for confirmation.

az acr repository list

List repositories in an Azure Container Registry.

az acr repository list --name
[--password]
[--resource-group]
[--subscription]
[--suffix]
[--top]
[--username]

Examples

List repositories in a given Azure Container Registry.

az acr repository list -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>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--suffix

The tenant suffix in registry login server. You may specify '--suffix tenant' if your registry login server is in the format 'registry-tenant.azurecr.io'. Applicable if you're accessing the registry from a different subscription or you have permission to access images but not the permission to manage the registry resource.

--top

Limit the number of items in the results.

--username -u

The username used to log into a container registry.

az acr repository show

Get the attributes of a repository or image in an Azure Container Registry.

az acr repository show --name
[--image]
[--password]
[--repository]
[--resource-group]
[--subscription]
[--suffix]
[--username]

Examples

Get the attributes of the repository 'hello-world'.

az acr repository show -n MyRegistry --repository hello-world

Get the attributes of the image referenced by tag 'hello-world:latest'.

az acr repository show -n MyRegistry --image hello-world:latest

Get the attributes of the image referenced by digest 'hello-world@sha256:abc123'.

az acr repository show -n MyRegistry --image hello-world@sha256:abc123

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

--image -t

The name of the image. May include a tag in the format 'name:tag' or digest in the format 'name@digest'.

--password -p

The password used to log into a container registry.

--repository

The name of the repository.

--resource-group -g

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--suffix

The tenant suffix in registry login server. You may specify '--suffix tenant' if your registry login server is in the format 'registry-tenant.azurecr.io'. Applicable if you're accessing the registry from a different subscription or you have permission to access images but not the permission to manage the registry resource.

--username -u

The username used to log into a container registry.

az acr repository show-manifests

Show manifests of a repository in an Azure Container Registry.

az acr repository show-manifests --name
--repository
[--detail]
[--orderby {time_asc, time_desc}]
[--password]
[--resource-group]
[--subscription]
[--suffix]
[--top]
[--username]

Examples

Show manifests of a repository in an Azure Container Registry.

az acr repository show-manifests -n MyRegistry --repository MyRepository

Show the latest 10 manifests ordered by timestamp of a repository in an Azure Container Registry.

az acr repository show-manifests -n MyRegistry --repository MyRepository --top 10 --orderby time_desc

Show the detailed information of the latest 10 manifests ordered by timestamp of a repository in an Azure Container Registry.

az acr repository show-manifests -n MyRegistry --repository MyRepository --top 10 --orderby time_desc --detail

Required Parameters

--name -n

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

--repository

The name of the repository.

Optional Parameters

--detail

Show detailed information.

--orderby

Order the items in the results. Default to alphabetical order of names.

accepted values: time_asc, time_desc
--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>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--suffix

The tenant suffix in registry login server. You may specify '--suffix tenant' if your registry login server is in the format 'registry-tenant.azurecr.io'. Applicable if you're accessing the registry from a different subscription or you have permission to access images but not the permission to manage the registry resource.

--top

Limit the number of items in the results.

--username -u

The username used to log into a container registry.

az acr repository show-tags

Show tags for a repository in an Azure Container Registry.

az acr repository show-tags --name
--repository
[--detail]
[--orderby {time_asc, time_desc}]
[--password]
[--resource-group]
[--subscription]
[--suffix]
[--top]
[--username]

Examples

Show tags of a repository in an Azure Container Registry.

az acr repository show-tags -n MyRegistry --repository MyRepository

Show the detailed information of tags of a repository in an Azure Container Registry.

az acr repository show-tags -n MyRegistry --repository MyRepository --detail

Show the detailed information of the latest 10 tags ordered by timestamp of a repository in an Azure Container Registry.

az acr repository show-tags -n MyRegistry --repository MyRepository --top 10 --orderby time_desc --detail

Required Parameters

--name -n

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

--repository

The name of the repository.

Optional Parameters

--detail

Show detailed information.

--orderby

Order the items in the results. Default to alphabetical order of names.

accepted values: time_asc, time_desc
--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>.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--suffix

The tenant suffix in registry login server. You may specify '--suffix tenant' if your registry login server is in the format 'registry-tenant.azurecr.io'. Applicable if you're accessing the registry from a different subscription or you have permission to access images but not the permission to manage the registry resource.

--top

Limit the number of items in the results.

--username -u

The username used to log into a container registry.

az acr repository untag

Untag an image in an Azure Container Registry.

az acr repository untag --image
--name
[--password]
[--resource-group]
[--subscription]
[--suffix]
[--username]

Examples

Untag an image from a repository.

az acr repository untag -n MyRegistry --image hello-world:latest

Required Parameters

--image -t

The name of the image. May include a tag in the format 'name:tag'.

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--suffix

The tenant suffix in registry login server. You may specify '--suffix tenant' if your registry login server is in the format 'registry-tenant.azurecr.io'. Applicable if you're accessing the registry from a different subscription or you have permission to access images but not the permission to manage the registry resource.

--username -u

The username used to log into a container registry.

az acr repository update

Update the attributes of a repository or image in an Azure Container Registry.

az acr repository update --name
[--delete-enabled {false, true}]
[--image]
[--list-enabled {false, true}]
[--password]
[--read-enabled {false, true}]
[--repository]
[--resource-group]
[--subscription]
[--suffix]
[--username]
[--write-enabled {false, true}]

Examples

Update the attributes of the repository 'hello-world' to disable write operation.

az acr repository update -n MyRegistry --repository hello-world --write-enabled false

Update the attributes of the image referenced by tag 'hello-world:latest' to disable write operation.

az acr repository update -n MyRegistry --image hello-world:latest --write-enabled false

Update the attributes of the image referenced by digest 'hello-world@sha256:abc123' to disable write operation.

az acr repository update -n MyRegistry --image hello-world@sha256:abc123 --write-enabled false

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

--delete-enabled

Indicates whether delete operation is allowed.

accepted values: false, true
--image -t

The name of the image. May include a tag in the format 'name:tag' or digest in the format 'name@digest'.

--list-enabled

Indicates whether this item shows in list operation results.

accepted values: false, true
--password -p

The password used to log into a container registry.

--read-enabled

Indicates whether read operation is allowed.

accepted values: false, true
--repository

The name of the repository.

--resource-group -g

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

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--suffix

The tenant suffix in registry login server. You may specify '--suffix tenant' if your registry login server is in the format 'registry-tenant.azurecr.io'. Applicable if you're accessing the registry from a different subscription or you have permission to access images but not the permission to manage the registry resource.

--username -u

The username used to log into a container registry.

--write-enabled

Indicates whether write or delete operation is allowed.

accepted values: false, true