docker info |grep Dir
Docker Root Dir: /var/lib/docker
#在配置文件中增加如下内容
vim /etc/docker/daemon.json
{ "data-root": "/data/docker" }
#完整内容如下
{
"log-driver": "json-file",
"log-opts": {
"max-size": "500m",
"max-file": "3"
},
"max-concurrent-downloads": 10,
"max-concurrent-uploads": 10,
"storage-driver": "overlay2",
"data-root": "/data/docker"
}
systemctl daemon-reload
systemct restart docker
docker info |grep Dir
docker info |grep Dir
Docker Root Dir: data/docker