How to analyze disk usage of a Docker container
After 1.13.0, Docker includes a new command docker system df
to show docker disk usage.
$ docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 5 1 2.777 GB 2.647 GB (95%)
Containers 1 1 0 B 0B
Local Volumes 4 1 3.207 GB 2.261 (70%)
To show more detailed information on space usage:
$ docker system df --verbose
To see the file size of your containers, you can use the --size
argument of docker ps
:
docker ps --size