system df 명령어를 사용하면 docker 이미지, 컨테이너, 볼륨의 용량을 확인할 수 있다.

$ docker system df
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          10        9         12.22GB   210.2MB (1%)
Containers      13        13        10.53MB   0B (0%)
Local Volumes   11        11        639.9MB   0B (0%)
Build Cache     0         0         0B        0B

-v 옵션을 쓰면 개별 이미지, 컨테이너, 볼륨 용량을 확인할 수 있다.

$ docker system df -v
Images space usage:

REPOSITORY                                       TAG                                       IMAGE ID       CREATED         SIZE      SHARED SIZE   UNIQUE SIZE   CONTAINERS
docker.jihoon.io/jihoon/test-storage-server      1.0.0                                     13455a4eae35   4 weeks ago     1.274GB   63.16MB       1.211GB       1
docker.jihoon.io/jihoon/secure-nginx             1.20.2-2                                  c8fccb244f4e   4 months ago    511.5MB   0B            511.5MB       3
postgres                                         13.2                                      82b8b88e26bc   14 months ago   314.3MB   0B            314.3MB       3

Containers space usage:

CONTAINER ID   IMAGE                                                                                    COMMAND                  LOCAL VOLUMES   SIZE      CREATED        STATUS        NAMES
ec3b00a987d8   docker.jihoon.io/jihoon/secure-nginx:1.20.2-2                                            "/bin/sh -c /entrypo…"   0               0B        2 days ago     Up 2 days     test-storage-server-nginx
ebb218652c5b   docker.jihoon.io/jihoon/test-storage-server:1.0.0                                        "/test-storage-se…"      0               490kB     2 days ago     Up 2 days     test-storage-server-app
73fef53d1af4   postgres:13.2                                                                            "docker-entrypoint.s…"   1               1.16kB    2 days ago     Up 2 days     test-storage-server-db

Local Volumes space usage:

VOLUME NAME     LINKS     SIZE
postgres        1         50.26MB

Build cache usage: 0B

CACHE ID   CACHE TYPE   SIZE      CREATED   LAST USED   USAGE     SHARED