az Verified current stable Not installed? Containers

Az / List Images Within Registry

List Images Within Registry

Lists all repositories within a specified Azure Container Registry (ACR).

$
Terminal
az acr repository list -n <registry_name> --output table

When To Use

When assessing the stored images and ensuring compliance with image retention policies.

Pro Tip

Utilize the --output json to handle results programmatically for automation.

Command Builder

Tune the command before you copy it

Back to syntax
$
Generated Command
az acr repository list -n <registry_name> --output table

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
| Repository Name       |
|-----------------------|
| my-app                |
| web-service           |
| database-service      |
| frontend              |
| backend               |

Anatomy of Output

Understanding the result

Repositories: image1, image2, sample-repo Available Repositories

Each repository represents a different container image stored.

TotalRepositories: 3 Count of Repositories

Indicates the total number of repositories in the ACR.

Troubleshooting

Common pitfalls

Error: NotFoundException -- Registry 'myRegistry' does not exist.

Solution: Double-check the registry name provided.

Error: InvalidResourceGroupException -- Resource group not specified or invalid.

Solution: Provide valid resource group context if not default.

Error: AccessDeniedException -- User is not authorized to perform this operation.

Solution: Ensure your user has the necessary permissions on the ACR.

Command Breakdown

What each part is doing

az
Base Command
The executable that performs this operation. Here it runs Az before the shell applies any redirect operators.
-n
n| name
The value supplied for n| name.
<registry_name>
registry name
The value supplied for registry name.
-n
Command Option
Tool-specific option used by this command invocation.
--output
Command Option
Tool-specific option used by this command invocation.

How To Run

Execution path

  1. Step 1

    Run `az acr repository list -n <registry_name> --output table` to list images.

  2. Step 2

    Verify the output displays repositories in a formatted table.

Alternative Approaches

Comparable commands in other tools

Alternative containers tools for the same job.