When troubleshooting problems regarding low system disk space, it can be useful to get information about Docker disk usage. This tutorial demonstrates how to do that.
The docker system
command, with df
argument, can be used to get information about disk space used by the Docker daemon.
docker system df
Output example:
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 1 1 141.8MB 0B (0%)
Containers 1 1 1.095kB 0B (0%)
Local Volumes 0 0 0B 0B
Build Cache 0 0 0B 0B
To get more detailed information about disk usage, the -v
or --verbose
option can be used:
docker system df -v
Output example:
Images space usage:
REPOSITORY TAG IMAGE ID CREATED SIZE SHARED SIZE UNIQUE SIZE CONTAINERS
nginx latest 76c69feac34e 3 weeks ago 141.8MB 0B 141.8MB 1
Containers space usage:
CONTAINER ID IMAGE COMMAND LOCAL VOLUMES SIZE CREATED STATUS NAMES
40861ca642cb nginx "/docker-entrypoint.…" 0 1.09kB 5 days ago Up 20 minutes nginx
Local Volumes space usage:
VOLUME NAME LINKS SIZE
Build cache usage: 0B
CACHE ID CACHE TYPE SIZE CREATED LAST USED USAGE SHARED
SHARED SIZE
- is the amount of disk space that is shared by an image with another one.UNIQUE SIZE
- is the amount of disk space that is used only by a specific image.SIZE
- is the sum ofSHARED SIZE
andUNIQUE SIZE
.
Leave a Comment
Cancel reply