docker17.06.2-ce命令4(docker system)

docker system 其中最重要的一个命令就是docker system prune 命令,清理没有使用的数据,包括镜像数据,已经停止的容器

查看 docker system 帮助

[root@localhost ~]# docker system --help

Usage:  docker system COMMAND

Manage Docker

Options:
      --help   Print usage

Commands:
  df          Show docker disk usage
  events      Get real time events from the server
  info        Display system-wide information
  prune       Remove unused data

Run 'docker system COMMAND --help' for more information on a command.
[root@localhost ~]# 

docker system prune

[root@localhost ~]# docker system prune
WARNING! This will remove:
        - all stopped containers # 清理停止的容器
        - all networks not used by at least one container #清理没有使用的网络
        - all dangling images #清理废弃的镜像
        - all build cache #清理构建缓存
Are you sure you want to continue? [y/N] y
Total reclaimed space: 0B
[root@localhost ~]# 

docker system df

查看容器磁盘使用情况

[root@localhost ~]# docker system df
TYPE                TOTAL               ACTIVE              SIZE                RECLAIMABLE
Images              10                  6                   2.652GB             1.953GB (73%)
Containers          6                   6                   6.922MB             0B (0%)
Local Volumes       0                   0                   0B                  0B
[root@localhost ~]# 

docker systemc info (docker info)

[root@localhost ~]# docker system info
Containers: 6
 Running: 6
 Paused: 0
 Stopped: 0
Images: 49
Server Version: 17.06.2-ce
Storage Driver: overlay
 Backing Filesystem: xfs
 Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-514.26.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 24
Total Memory: 31.21GiB
Name: localhost.localdomain
ID: YTL2:6RWX:IZK6:X4XC:XKMO:WVXD:LXPR:E5GN:GEJB:WIUX:L5YH:PDFB
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Registry Mirrors:
 http://9zkjjecg.mirror.aliyuncs.com/
 https://docker.mirrors.ustc.edu.cn/
Live Restore Enabled: false

[root@localhost ~]# 

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Docker — 云时代的程序分发方式 要说最近一年云计算业界有什么大事件?Google Compute Engi...
    ahohoho阅读 15,636评论 15 147
  • 转载自 http://blog.opskumu.com/docker.html 一、Docker 简介 Docke...
    极客圈阅读 10,544评论 0 120
  • 看白先生的书是源自于十年前那部台湾公视的电视《孽子》,完全推翻了我对台湾只产偶像剧、八点档的定论。它迷离、痛...
    怪诞城之夜阅读 622评论 0 0
  • 想过死 不止一次 但是 死又能解决什么问题呢 什么都不能 只是逃避 于事无补 所以 还活着 活着 挺累 挺苦 难 ...
    照亮Br阅读 311评论 4 5
  • 两节干电池和一块带磁石的微型电路板就能做一个播放器,音符通过电磁感应从生硬的固体原件里窜生出来的一瞬间,如果能够放...
    脸盲叔叔阅读 261评论 0 1