systemctl stop docker
yum install rsync -y
mkdir -p /home/docker-data
# 注意这个路径 { "data-root": "/home/docker-data/docker" }
rsync -avz /var/lib/docker /home/docker-data
cat > /etc/docker/daemon.json << EOF
{
"data-root": "/home/docker-data/docker",
"registry-mirrors": ["https://mirror.ccs.tencentyun.com"]
}
EOF
# 国内镜像
# 腾讯云 https://mirror.ccs.tencentyun.com
# docker中国 https://registry.docker-cn.com
# 网易 http://hub-mirror.c.163.com
# daocloud http://f1361db2.m.daocloud.io
systemctl daemon-reload
#systemctl reset-failed docker.service
systemctl restart docker
docker info