
rsync -avz -e  root@10.100.2.121:/root/.ssh/* /root/.ssh/

scp root@10.100.2.121:/root/.ssh/* /root/.ssh/

# 删除空白行
sed -i '/^$/d' /root/.ssh/*

ssh 10.100.2.121

docker 安装
mkdir -p /etc/docker
rsync -av --ignore-existing  root@10.100.2.121:/usr/lib/systemd/system /usr/lib/systemd/system
rsync -av --ignore-existing  root@10.100.2.121:/usr/local/bin /usr/local/bin
rsync -av --ignore-existing  root@10.100.2.121:/etc/docker /etc/docker
rsync -av --ignore-existing  root@10.100.2.121:/usr/bin /usr/bin
groupadd docker

# debug
journalctl -u containerd -n 100 -f

journalctl -u docker -n 100 -f
journalctl -u docker.socket -n 100 -f

systemctl stop docker.socket

systemctl start containerd
systemctl start docker.socket
systemctl start docker

sed -i "s/10.100.2.121/192.168.211.215/g" /etc/docker/daemon.json
systemctl restart docker

集群启动

镜像同步
haorbor数据完全同步


mkdir -p /root/wdd
mkdir -p /var/lib/docker/harbor-data
rsync -avz -e  root@10.100.2.121:/root/wdd /root/wdd
scp -r  root@10.100.2.121:/root/wdd/* /root/wdd/
rsync -avz -e  root@10.100.2.121:/var/lib/docker/harbor-data/  /var/lib/docker/harbor-data/
scp -R  root@10.100.2.121:/var/lib/docker/harbor-data/  /var/lib/docker/harbor-data/


yaml文件同步
备份下来  然后同步

