The parameter specifying the mirror and container storage path is--graph=/var/lib/docker, whose default storage location is /var/lib/docker,
Docker configuration file can set most of the background process parameters, in the various operating systems in the storage location inconsistent,
1. The location in Ubuntu is:/etc/default/docker,
Options=--graph= "/root/data/docker"-H fd://# or docker_opts= "-g/root/data/docker"
After the last reboot, the Docker path is changed to/root/data/docker.
2. The location in CentOS is:/etc/sysconfig/docker.
2-1) Modify the Docker.service file and use the-G parameter to specify the storage location
VI /usr/lib/systemd/system/docker.service
Execstart=/usr/bin/dockerd --graph/new-path/docker
2-2) Reload configuration file
2-3) Restart Docker
Systemctl Restart Docker.service
2-4) View Docker Root Dir:/var/lib/docker changed to a set directory/new-path/docker
Info
Linux modifies Docker images and container data storage locations