[root@k8s-node1 tools]# docker info | grep "Docker Root Dir" WARNING: API is accessible on http://127.0.0.1:4243 without encryption. Access to the remote API is equivalent to root access on the host. Refer to the ‘Docker daemon attack surface‘ section in the documentation for more information: https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface Docker Root Dir: /var/lib/docker
systemctl stop docker
[root@k8s-node1 app]# mv /var/lib/docker /app/data/docker #这里/app为挂载的网络存储NAS [root@k8s-node1 app]# ln -s /app/data/docker /var/lib/docke #软链接到原来的目录
systemctl start docker
[root@k8s-node1 ~]# docker info|grep "Docker Root Dir" WARNING: API is accessible on http://127.0.0.1:4243 without encryption. Access to the remote API is equivalent to root access on the host. Refer to the ‘Docker daemon attack surface‘ section in the documentation for more information: https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface Docker Root Dir: /app/data/docker
原文:https://www.cnblogs.com/yanxinjiang/p/12155005.html