Share via


az acr repository

Manage repositories (image names) for Azure Container Registries.

Commands

Name Description Type Status
az acr repository delete

Delete a repository or image in an Azure Container Registry.

Core GA
az acr repository list

List repositories in an Azure Container Registry.

Core GA
az acr repository list-deleted

List soft-deleted repositories in an Azure Container Registry.

Core Preview
az acr repository show

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

Core GA
az acr repository show-manifests

Show manifests of a repository in an Azure Container Registry.

Core Deprecated
az acr repository show-tags

Show tags for a repository in an Azure Container Registry.

Core GA
az acr repository untag

Untag an image in an Azure Container Registry.

Core GA
az acr repository update

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

Core GA

az acr repository delete

Delete a repository or image in an Azure Container Registry.

This command deletes all associated layer data that are not referenced by any other manifest in the container registry.

az acr repository delete --name
                         [--image]
                         [--password]
                         [--repository]
                         [--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. It should be specified in lower case. 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.

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

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az acr repository list

List repositories in an Azure Container Registry.

az acr repository list --name
                       [--password]
                       [--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. It should be specified in lower case. 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.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az acr repository list-deleted

Preview

This command is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List soft-deleted repositories in an Azure Container Registry.

az acr repository list-deleted --name
                               [--password]
                               [--suffix]
                               [--username]

Examples

List soft-deleted repositories in a given Azure Container Registry.

az acr repository list-deleted -n myregistry

Required Parameters

--name -n

The name of the container registry. It should be specified in lower case. 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.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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]
                       [--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. It should be specified in lower case. 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.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az acr repository show-manifests

Deprecated

This command has been deprecated and will be removed in a future release. Use 'acr manifest list-metadata' instead.

Show manifests of a repository in an Azure Container Registry.

az acr repository show-manifests --name
                                 --repository
                                 [--detail]
                                 [--orderby {time_asc, time_desc}]
                                 [--password]
                                 [--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. It should be specified in lower case. 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.

Default value: False
--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.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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]
                            [--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. It should be specified in lower case. 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.

Default value: False
--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.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

az acr repository untag

Untag an image in an Azure Container Registry.

This command does not delete the manifest referenced by the tag or any associated layer data.

az acr repository untag --image
                        --name
                        [--password]
                        [--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. It should be specified in lower case. 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.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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]
                         [--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. It should be specified in lower case. 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.

--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
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

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

--verbose

Increase logging verbosity. Use --debug for full debug logs.