dive
dive copied to clipboard
Add image size to CI=true output
Hey 👋🏻
What would you like to be added:
I'd like to see the total image size on output when running with CI=true (or --ci).
Why is this needed:
It's useful to know about size changes on patches/pull requests (example).
Not sure if I'm missing something here. So please let me know.
I was looking for the same. But since you should have docker installed, you can run this command:
docker images __your_image__ --format '{{.VirtualSize}}'
855.1MB
from this example
docker images identity-management --format 'json'
{"Containers":"0","CreatedAt":"2025-10-23 11:12:53 +0200 CEST","CreatedSince":"10 minutes ago","Digest":"\u003cnone\u003e","ID":"f547bd5e9c5a","Repository":"identity-management","SharedSize":"N/A","Size":"855MB","Tag":"latest","UniqueSize":"N/A","VirtualSize":"855.1MB"}
or
docker image inspect __your_image__ --format '{{.Descriptor.size}}`
856