docker system df を使えばOK。
$ docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 157 22 39.25GB 36.31GB (92%) Containers 35 5 493.4MB 455.2MB (92%) Local Volumes 204 53 7.277GB 4.954GB (68%) Build Cache 0 0 0B 0B
docker system df -v だとコンテナごとのディスク使用量がみれる。
つかっていないイメージなどを消すには docker system prune が便利。
$ docker system prune
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all dangling images
- all dangling build cache
Are you sure you want to continue? [y/N] y
参考