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快快樂樂、認認真真生活才是真。