标签:
Find the systemd docker.service unit file. (找到docker.service所在目录)
Mine is located at: /usr/lib/systemd/system/docker.service
在docker.service中可以看到如下环境配置的文件:
EnvironmentFile=-/etc/sysconfig/docker
EnvironmentFile=-/etc/sysconfig/docker-storage
EnvironmentFile=-/etc/sysconfig/docker-network
存储驱动修改就在/etc/sysconfig/docker-storage上面
比如我修改成overlay驱动方式(需要centos内核版本3.18.x以上,并且docker的版本比较新,最好1.4以上)
DOCKER_STORAGE_OPTIONS="--storage-driver=overlay"
然后dock info一下
[root@localhost default]# docker info
Containers: 0
Images: 0
Storage Driver: overlay
Backing Filesystem: xfs
Execution Driver: native-0.2
Kernel Version: 4.1.2-1.el7.elrepo.x86_64
Operating System: CentOS Linux 7 (Core)
CPUs: 4
Total Memory: 974.8 MiB
Name: localhost.localdomain
ID: PPG3:UCJG:ITPH:SFX5:MNMX:H3NH:LJET:KEK5:GNCC:VRKM:I5TS:PQY5
标签:
原文地址:http://my.oschina.net/u/932809/blog/482709