找了好久担平,在stackoverflow上找到一個(gè)修改辦法
這個(gè)是跑在CENTOS和RHEL7上才能用到以下辦法?
This solution works on Red Hat 7.2 & Docker 1.12.0
Edit the file /lib/systemd/system/docker.service in your text editor.
add -g /path/to/docker/ at the end of ExecStart directive. The complete line should look like this.
ExecStart=/usr/bin/dockerd -g /path/to/docker/
Execute the below command
systemctl daemon-reload
systemctl restart docker
Execute the command to check docker directory
docker info | grep "loop file\|Dir"
If you have /etc/sysconfig/docker file in Red Hat or docker 1.7.1 check this answer.