在Docker v1.4.1 中,我们可以在主机上找到容器的 rootfs 。例如:
cd /var/lib/docker/devicemapper/mnt/ab83a2638bb23f24d8811fa9b4ca458efca9269696ff3112cc670be2833f3f92/rootfs/
.autofsck .dockerenv lost+found/ proc/ sys/
.autorelabel .dockerinit media/ root/ tmp/
bin/ etc/ mnt/ sbin/ usr/
boot/ lib/ opt/ selinux/ var/
dev/ lib64/ .pki/ srv/
但在Docker v1.6.0 中,我发现/var/lib/docker/devicemapper/mnt/911d7ac8fca78b2beca8752ec89d80c06a1ea1dd8a65099d074ed40eec0c6cce
为空。
v1.6.0 的位置是什么?
已经使用过devicemapper
# docker -D info
Containers: 4
Images: 58
Storage Driver: devicemapper
Pool Name: docker-253:1-2886824-pool
Pool Blocksize: 65.54 kB
Backing Filesystem: extfs
Data file: /dev/loop0
Metadata file: /dev/loop1
Data Space Used: 12.12 GB
Data Space Total: 107.4 GB
Data Space Available: 95.26 GB
Metadata Space Used: 10.48 MB
Metadata Space Total: 2.147 GB
Metadata Space Available: 2.137 GB
Udev Sync Supported: true
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Library Version: 1.02.93 (2015-01-30)
Execution Driver: native-0.2
Kernel Version: 4.0.6-300.fc22.x86_64
Operating System: Fedora 22 (Twenty Two)
CPUs: 2
Total Memory: 3.705 GiB
Name: rhel65.cn.ibm.com
ID: WERO:NIMH:2K3M:GRGS:2Q5T:JDU4:QMO3:QFE5:QZJB:GICM:OLMS:7GFL
Debug mode (server): false
Debug mode (client): true
Fds: 18
Goroutines: 28
System Time: Fri Aug 7 22:33:58 CST 2015
EventsListeners: 0
Init SHA1: a29656f0ad364f66e24c1ff1cf36b9e0e2bd5b0d
Init Path: /usr/libexec/docker/dockerinit
Docker Root Dir: /var/lib/docker
答案 0 :(得分:2)
这可能只是意味着您的码头工具默认不使用该驱动程序
请参阅Xcode Release notes,并检查docker -D info
的输出:
在
--storage-driver=devicemapper
上添加了DOCKER_OPTS
并且有效。