Commit 0930a6ee by tingweiwang

Delete 3-docker_install.sh

1 parent 66acb675
Showing with 0 additions and 16 deletions
#!/bin/bash
harbor_host=192.168.1.32:5000
echo "当前harbor仓库地址为$harbor_host,"
sed -i s/harbor_host/$harbor_host/g /root/k8s/config/daemon.json
echo "开始安装docker"
ansible all -m shell -a "apt update --allow-insecure-repositories"
ansible all -m shell -a "apt install docker-ce=18.03.1~ce-0~ubuntu -y --allow-unauthenticated"
echo "分发已修改的daemon.json文件"
ansible all -m copy -a "src=/root/k8s/config/daemon.json dest=/etc/docker/"
ansible all -m shell -a "service docker restart"
ansible all -m shell -a "service docker status"
ansible all -m shell -a "cat /etc/docker/daemon.json"
echo "还原daemon.json模板文件"
sed -i s/$harbor_host/harbor_host/g /root/k8s/config/daemon.json
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!