I have changed the default docker folder like it is described in the topic : How do I change the default docker container location?:
- stopped docker
sudo systemctl stop docker && systemctl stop docker.socket
- modified /etc/docker/ daemon.json
{
"data-root":/mnt/disk/docker"
}
- copied a data from /var/lib/docker to /mnt/disk/docker
cp -rp /var/lib/docker /mnt/disk/docker
- start the docker
sudo systemctl daemon-reload
sudo systemctl start docker
I can see that docker is using /mnt/disk/docker after changes but docker can't find containers and images. I restored the docker configuration but docker can't find a containers and images in the old directory.
Does anyone have a idea what is wrong? How to restore?