Reputation: 6883
I sent a docker file for Google Cloud Build. The build was created successfully.
The artifact URL is:
gcr.io/XXX/api/v1:abcdef017e651ee2b713828662801b36fc2c1
How I can check the image size? (MB\GB)
Upvotes: 0
Views: 1871
Reputation: 75910
There isn't API for this. But I have a workaround, this Linux command line
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \
https://gcr.io/v2/XXX/api/v1/manifests/abcdef017e651ee2b713828662801b36fc2c1 2>/dev/null | \
jq ".layers[].size" | \
awk '{s+=$1} END {print s}'
Detail line by line
-> Result is in Byte.
Upvotes: 1