How to get image size from Azure ACR repositories

Patil, Rohit 6 Reputation points
2022-10-28T15:01:28.63+00:00

We have more than 100 repositories present in one of the ACR. Each repository has uploaded multiple images with different version/tag. Ask is to find size of each image which got pushed in repository.
Kindly suggest how to find size of images of all the repositories.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,968 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 15,491 Reputation points MVP Volunteer Moderator
    2022-10-29T05:23:38.793+00:00

    Hi @Patil, Rohit

    Thanks for reaching Q & A forum.

    The size you see in Azure Portal or with az acr show-usage is the size of all the images in a registry. We don't have support for each image size at this point.

    Try with the CLI

    $ az acr repository show-manifests --repository fatimage --detail --query '[].{Size: imageSize, Tags: tags}'
    [
    {
    "Size": 4296278237,
    "Tags": [
    "4gb"
    ]
    }

    ------
    If this answers your query, do click Accept Answer and Up-Vote for the same. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.