[root@pi ~]# du -hs /var/lib/docker/
17G /var/lib/docker/
12
二、执行如下可以查看 Docker 的磁盘使用情况(类似于 Linux 上的 df 命令)
[root@pi ~]# docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 421.659GB 268.9MB (16%)
Containers 221.037GB 0B (0%)
Local Volumes 00 0B 0B
Build Cache 00 0B 0B
123456
三、 docker system prune -a命令清理得更加彻底,可以将没有容器使用 Docker 镜像都删掉
[root@pi ~]# docker system prune -a
WARNING! This will remove:- all stopped containers- all networks not used by at least one container- all images without at least one container associated to them- all build cacheAre you sure you want to continue? [y/N] y
Total reclaimed space: 0B