Docker 18.09.0-ce-beta1
在docker環境中我們常常因為測試揮抓取許多image檔,這次要透過OS實體路徑的方式直接找到這些image: Oracle 12.2.0.1
1.先確定docker有安裝,並且找出docker資訊
從以下資訊也可以找到,找到"Docker Root Dir"就是我們要找的路徑
[root@localhost docker]# docker
info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 18.09.0-ce-beta1
Storage Driver: overlay2
Backing
Filesystem: xfs
Supports
d_type: true
Native Overlay
Diff: 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 local logentries splunk syslog
Swarm: inactive
Runtimes: containerd runc
Default Runtime: containerd
Init Binary: docker-init
containerd version:
ce243288e27971e324363de8f322d221635a8521 (expected:
468a545b9edcd5932818eb9de8e72413e616e86e)
runc version: 70ca035aa6ecfc496e13365fdef20383408501ba
(expected: 69663f0bd4b60df09991c08812a60108003fa340)
init version: fec3683
Kernel Version: 3.10.0-862.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 2.92GiB
Name: localhost.localdomain
ID:
QA4X:MPVV:P6TF:5GJ2:SM7Z:WCX2:TIMG:NVHB:W5ZA:ROUM:PRTE:LCB4
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: bennett3147
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
2.找出docker儲存image的預設路徑
command:
sudo docker info | grep "Docker Root Dir"
[root@localhost docker]# sudo
docker info | grep "Docker Root Dir"
Docker
Root Dir: /var/lib/docker3.利用"find"指令找出大小大於2GB檔案
command:
find / -type f -size +2G
[root@localhost docker]# find
/ -type f -size +2G
/proc/kcore
find: ‘/proc/6556/task/6556/fdinfo/5’: No such file or
directory
find: ‘/proc/6556/fdinfo/6’: No such file or directory
find: ‘/run/user/1000/gvfs’: Permission denied
/var/lib/docker/overlay2/38d70160996a7bd399a47b5b2ce00dc4ad3aae436d885871437bef7f77ef51ab/diff/tmp/dbsetup/dbtar/db12.2.0.1.0.tar.gz
[root@localhost
docker]#
沒有留言:
張貼留言