## docker更改数据盘

1. 停止docker服务
systemctl stop docker.socket
systemctl stop docker.serivce

2. 创建目标目录
mkdir -p /data/docker

3. 同步数据
rsync -avz /var/lib/docker/ /data/docker

4. 找到启动配置
find / -name docker.service
systemctl status docker

5. 更改配置
vim /lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --graph=/data/docker

6. 配置生效、重启docker
systemctl daemon-reload
systemctl start docker.service

7. 查看是否生效
docker info