1、docker system df
类似于Linux上的df命令,用于查看Docker的磁盘使用情况
[root@centos741 docker]# docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 0 0 0 B 0 B
Containers 0 0 0 B 0 B
Local Volumes 3 0 15.62 GB 15.62 GB (100%)
2、docker system prune
清理磁盘,删除关闭的容器、无用的数据卷和网络,以及dangling镜像(即无tag的镜像)
[root@centos741 docker]# docker system prune
WARNING! This will remove:
- all stopped containers
- all volumes not used by at least one container
- all networks not used by at least one container
- all dangling images
Are you sure you want to continue? [y/N] y
Deleted Volumes:
33b0fdfcc181cc553704d4c9604dca20285da5458efe583704c6afeeacd56712
b9dddc44a6046a2086df83a6389e10234614719df6d9a72a003b8c4591837378
d1068cf048b8bc57627f9277f77b8539499293832e822d57d44ad7f7c1a29020
Total reclaimed space: 15.62 GB
https://blog.csdn.net/weixin_32820767/article/details/81196250快快乐乐、认认真真生活才是真。