1, View Docker default directory to store data
[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
2. Stop Docker service
systemctl stop docker
3, the mobile Docker data directory to the specified partition
[@ K8S the root-node1 App] # Music Videos / var / lib / Docker / app / Data / Docker # where / app network storage to mount the NAS [@ K8S the root -node1 App] -s LN # / app / Data / Docker / var / lib / Docke # soft link to the original directory
4, start Docker view storage directory service
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