查看docker的磁盘使用情况
[root@node-master 20191023]# docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 2 1 2.903GB 201.9MB (6%)
Containers 1 0 0B 0B
Local Volumes 0 0 0B 0B
Build Cache 0 0 0B 0B
查看详细的docker信息
[root@node-master ~]# docker system info
Client:
Debug Mode: false
Server:
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 10
Server Version: 19.03.3
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb
runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 3.10.0-957.27.2.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.683GiB
Name: node-master
ID: HOPE:2PN3:VTE6:ET7P:UADA:5HEZ:6D3L:5BKI:RHH7:I5VP:6YWU:EVLL
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Registry Mirrors:
https://wq238mbd.mirror.aliyuncs.com/
Live Restore Enabled: false
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
实时输出Docker服务器端的事件,包括容器的创建,启动,关闭等。docker system events Get real time events from the server
[root@node-master 20191023]# docker system events
删除无用的数据docker system prune Remove unused data
[root@node-master 20191023]# 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 cache
Are you sure you want to continue? [y/N] y
Deleted Containers:
7f99c5a9fb72a81e7e638830d1b6e48f9fe7745004411b6d2d87ec74462919c4
d297370472f732b1ec3b285339619953030e2dace2388815fb6b80b844625088
cc11e7937a25887e49246724c8ab965877d2a9c46505ec4c695fde21d103928e
Deleted Images:
deleted: sha256:82ed02a848a05b82951524c171bcb326672ee346675d6826340d08db961144de
deleted: sha256:571305517e021366c2377c9ec7a771b04b3262f6a1b12ead893d3f031f6c56ab
deleted: sha256:27d94765aad0368063f3513520ac8b15675d43611e61ec4b98cbf19155944eb8
deleted: sha256:6da1ea69fb345bcebb90b4309348283024398d2b48e7d9c7388de012ff59d060
deleted: sha256:67ca2a46cb1035bd66956f84e8ca94cea66b96267b061553d2c3ca079d62688e
参考信息:https://docs.docker.com/engine/reference/commandline/system/