How to check the size of a Docker Container


Know the size of docker containter

In order to know what size is utilized by a docker container we can make use of the docker ps command with --size option.

Example:
% docker ps -a --size --format "table {{.ID}}\t{{.Names}}\t{{.Image}}\t{{.Size}}"
CONTAINER ID   NAMES               IMAGE     SIZE
9f02645eac99   nifty_yalow         nginx     1.09kB (virtual 135MB)
6df1f3248f02   modest_montalcini   alpine    0B (virtual 5.29MB)
31b01099d9d6   competent_pasteur   alpine    539MB (virtual 544MB)


Have Questions? Post them here!
Advertisements
Try Out Code2care Dev Tools:

Advertisements

Advertisements
Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and software developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include learnings, tutorials, trouble-shooting steps, video tutorials, code snippets, how-to, blogs, articles, etc.

🎉 We are celebrating the 10th years of Code2care! Thank you for all your support!

We strongly support Gender Equality & Diversity.