Docker学习(6)------配置Docker使用overlay

操作环境

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

[root@localhost /]# systemctl daemon-reload 
[root@localhost /]# systemctl restart docker

3.查看Docker信息,可以查看到Storage Driver为overlay,Docker Root Dir为 /mnt

[root@localhost /]# 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


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值