mirror of https://github.com/easzlab/kubeasz.git
fix: docker下载URL选择
parent
ebf21b8af6
commit
1e752e4b67
|
@ -25,7 +25,12 @@ function install_docker() {
|
||||||
systemctl status docker|grep Active|grep -q running && { echo "[WARN] docker is already running."; return 0; }
|
systemctl status docker|grep Active|grep -q running && { echo "[WARN] docker is already running."; return 0; }
|
||||||
systemctl status containerd|grep Active|grep -q running && { echo "[ERROR] containerd is running, unsupported."; exit 1; }
|
systemctl status containerd|grep Active|grep -q running && { echo "[ERROR] containerd is running, unsupported."; exit 1; }
|
||||||
|
|
||||||
DOCKER_URL=https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/docker-${DOCKER_VER}.tgz
|
if [[ "$REGISTRY_MIRROR" == CN ]];then
|
||||||
|
DOCKER_URL="https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/static/stable/x86_64/docker-${DOCKER_VER}.tgz"
|
||||||
|
else
|
||||||
|
DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VER}.tgz"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p /opt/kube/bin /etc/docker /etc/ansible/down
|
mkdir -p /opt/kube/bin /etc/docker /etc/ansible/down
|
||||||
if [[ -f "/etc/ansible/down/docker-${DOCKER_VER}.tgz" ]];then
|
if [[ -f "/etc/ansible/down/docker-${DOCKER_VER}.tgz" ]];then
|
||||||
echo "[INFO] docker binaries already existed"
|
echo "[INFO] docker binaries already existed"
|
||||||
|
|
Loading…
Reference in New Issue