Docker學習(6)------配置Docker使用overlay
阿新 • • 發佈:2018-12-31
操作環境
Centos 7 Docker version 17.03.0-ce, build 60ccb22操作步驟
1.配置Docker儲存方式為overlay,儲存目錄為/mnt,修改docker.service配置檔案中的ExecStart引數如下# for containers run by docker
ExecStart=/usr/bin/dockerd --graph=/mnt --storage-driver=overlay
2.重啟docker service
[[email protected] /]# systemctl daemon-reload
[[email protected] /]# systemctl restart docker
3.檢視Docker資訊,可以檢視到Storage Driver為overlay,Docker Root Dir為 /mnt
[[email protected] /]# docker info Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 1 Server Version: 17.03.0-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 Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 977c511eda0925a723debdc94d09459af49d082a runc version: a01dafd48bc1c7cc12bdb01206f9fea7dd6feb70 init version: 949e6fa Security Options: seccomp Profile: default Kernel Version: 3.10.0-514.10.2.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 15.5 GiB Name: localhost.localdomain ID: OFSQ:L72F:BGO4:JQFT:66UZ:IJYF:RWRW:RYJF:O624:F3Z5:NNIE:HO3H Docker Root Dir: /mnt 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: https://wghlmi3i.mirror.aliyuncs.com Live Restore Enabled: false