docker1.12.6 will replace the overlay storage drive

About overlay storage drive
storage drive Docker is pluggable architecture that lets you easily will fit your drive environments and storage cases of "inserted" Docker use. Each storage drive Docker are based on one kind of Linux file system or volume management system, it may be free to follow its own method to manage image layer and the container layer. That some storage drive would be better under different scenarios other than driving performance.

Overlay
Overlay support after 3.18 of the Linux kernel, but also a Union FS, and multiple layers of different AUFS Overlay is only two: a upper and a lower file system file system, representing the mirror layer and the container layer Docker's. When the need to modify a file, copy the file from the use of CoW lower read-only to writable upper modify the result is also stored in upper layer. In Docker, the bottom layer is a read-only image, writable layer is Container

Configuration of storage Docker overlay, storage directory is / mnt, ExecStart modify parameters in the configuration file as follows docker.service

[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target
Wants=docker-storage-setup.service
Requires=docker-cleanup.timer

[Service]
Type=notify
NotifyAccess=all
EnvironmentFile=-/etc/sysconfig/docker
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
Environment=GOTRACEBACK=crash
Environment=DOCKER_HTTP_HOST_COMPAT=1
Environment=PATH=/usr/libexec/docker:/usr/bin:/usr/sbin
ExecStart=/usr/bin/dockerd --graph=/mnt --storage-driver=overlay \
--add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \
--default-runtime=docker-runc \
--exec-opt native.cgroupdriver=systemd \
--userland-proxy-path=/usr/libexec/docker/docker-proxy-current \
$OPTIONS \
$DOCKER_STORAGE_OPTIONS \
$DOCKER_NETWORK_OPTIONS \
$ADD_REGISTRY \
$BLOCK_REGISTRY \
$INSECURE_REGISTRY
ExecReload=/bin/kill -s HUP $MAINPID
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity
TimeoutStartSec=0
Restart=on-abnormal
MountFlags=slave

[Install]
WantedBy=multi-user.target

2.重启docker service
[root@localhost /]# systemctl daemon-reload
[root@localhost /]# systemctl restart docker

3.查看Docker信息,可以查看到Storage Driver为overlay,Docker Root Dir为 /mnt
[root@node1 ~]# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.12.6
Storage Driver: overlay
Backing Filesystem: xfs
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
Volume: local
Network: null host bridge overlay
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Security Options: seccomp selinux
Kernel Version: 3.10.0-514.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 2
Total Memory: 7.64 GiB
Name: node1.example.com
ID: PUJA:BDHT:37PB:MMF6:ZD5U:J25Q:XSUJ:ASUS:YVSZ:BMBT:T2CP:UZON
Docker Root Dir: /mnt
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
172.30.0.0/16
127.0.0.0/8
Registries: docker.io (secure)

 

Guess you like

Origin www.cnblogs.com/ztxd/p/12285476.html