sudo docker info | grep "Docker Root Dir"
cp -a /var/lib/docker /path/to/docker
vim /etc/docker/daemon.json
{ "data-root": "/path/to/docker", "storage-driver": "overlay2" # 这个是Docker的默认设置,这里也可以不用加 }
sudo systemctl restart docker
两种方式迁移Docker