docker目录及数据迁移

systemctl stop docker

mkdir -p /doc_vlume/ky/lib/docker

/usr/bin/cp -R /var/lib/docker/* /doc_vlume/ky/lib/docker或使用如下迁移命令:

rsync -avz /var/lib/docker /data/docker/lib/

vim /etc/systemd/system/docker.service

ExecStart=/usr/bin/dockerd --graph=/doc_vlume/ky/lib/docker

systemctl daemon-reload

systemctl start docker

systemctl enable docker

你可能感兴趣的:(docker)