#查看资源占用
docker system df
#默认位置
/var/lib/docker
systemctl stop docker
cp -r /var/lib/docker/* /data/docker/
mv /var/lib/docker /var/lib/docker_bak
#生成软件链接
ln -s /data/docker /var/lib/docker
systemctl restart docker
[Service]
ExecStart=/usr/bin/docker daemon -g /data/docker -H fd://
#添加 -g /data/docker
#或者
ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --graph /data/docker
/etc/docker/daemon.json
"data-root":"/data/docker"
复制文件
cp -r /var/lib/docker/* /data/docker/
systemctl daemon-reload
systemctl start docker
rm -rf /var/lib/docker
jenkins处理同上
rabbitmq
“./logs:/var/log/rabbitmq/“