docker 常用命令 system篇


1.查看docker 空間使用情況

[root@worker1 ~]# docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              3                   0                   319.9MB             319.9MB (100%)
Containers          0                   0                   0B                  0B
Local Volumes       1                   0                   156.5kB             156.5kB (100%)
Build Cache         0                   0                   0B                  0B

2.查看實時事件(例如容器創建,刪除等均會實時顯示)

[root@worker1 ~]# docker system events

3.查看docker 系統信息(同docker info)

[root@worker1 ~]# docker system info

4.docker清理(清理停止的容器,沒用容器使用的網絡,鏡像,緩存)

[root@worker1 ~]# 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
Total reclaimed space: 0B
[root@worker1 ~]# 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM