Relocating the Docker root directory | Docker dir path
Bashsudo systemctl stop docker
sudo systemctl stop docker.socket
sudo systemctl stop containerd
Bashsudo mkdir -p /new_dir_structure
Bashsudo mv /var/lib/docker /new_dir_structure
Bashsudo vim /etc/docker/daemon.json
JSON{
"data-root": "/new_dir_structure/docker"
}
Bashsudo systemctl start docker
Bashdocker info -f '{{ .DockerRootDir}}'