ECR Images and layers

0

I'm looking to find out the size of all the layers that they are using. I will use this information to calculate the storage costs for these layers. In addition, they Forecast Different Lifecycle Policies. I would like to get this information without pulling down all the layers. We are looking to query. Is there an ECR API that can return all the layers and the size of the layers without walking them?

AWS
feita há um ano1089 visualizações
1 Resposta
1
Resposta aceita

We can use the AWS CLI to find the size of all the layers in an ECR image without pulling down the layers using below ECR CLI command:

aws ecr batch-get-image --repository-name <repo-name> --image-ids imageDigest-<image-digest' --region <region>

To find out image digest run use below ECR CLI command:

aws ecr list-images --repository-name <repo-name> --region <region>

We can also use the command below to achive that. docker buildx imagetools inspect --raw $IMAGE_NAME:$IMAGE_TAG Installation guide : https://docs.docker.com/build/install-buildx/ Command documentation : https://docs.docker.com/engine/reference/commandline/buildx_imagetools_inspect/

AWS
respondido há um ano
profile picture
ESPECIALISTA
avaliado há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas