docker迁移数据目录

1
2
3
systemctl stop docker
cp -rv /var/lib/docker/* /opt/docker/data
vim /etc/docker/daemon.json
1
2
3
{
    "data-root": "/opt/docker/data"
}
1
systemctl strat docker
updatedupdated2024-10-282024-10-28