With the docker system df
command you would get a summary of your Docker usage including things like:
However, here’s how to check the size of each running container
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
By default, if you run
docker images
you will get the size of each image. However, if you rundocker ps
you would not get the size of the running containers.To check the size of each running container what you could do is just use the
--size
argument ofdocker ps
command.You would get the following output:
That way you will be able to quickly tell which container exactly is consuming the most disk space.
In case that you need to clear some space, I would recommend checking out this tutorial here on how to remove Docker Images, Containers and Volumes:
https://www.digitalocean.com/community/tutorials/how-to-remove-docker-images-containers-and-volumes
Hope that this helps!
Try this: https://github.com/amerkurev/doku/
Doku - Docker disk usage dashboard
The “docker system df” command displays the summary of the amount of disk space used by the docker daemon and “docker system df –v” gives the detailed view.
But we can only get the total file size of each container by using the given command;
We will be getting the following input: