From fb585443c496d1dd0c80c46c150bb2504b8710a8 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Sat, 18 Sep 2021 17:23:42 +0800 Subject: [PATCH] Update docker-installer.sh --- scripts/docker-installer.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/docker-installer.sh b/scripts/docker-installer.sh index 1edf54fe..a6abb1f4 100644 --- a/scripts/docker-installer.sh +++ b/scripts/docker-installer.sh @@ -55,6 +55,7 @@ do esac shift done + [ ! -n "$repo_name" ] && exit 1 @@ -150,7 +151,7 @@ install_docker_compose(){ save_images(){ sudo rm -rf /tmp/docker-$repo_name - sudo git clone https://github.com/Websoft9/docker-$repo_name.git /tmp/docker-$repo_name + sudo git clone https://github.com/Websoft9/docker-$repo_name.git /tmp/docker-$repo_name || sudo git clone https://github.com.cnpmjs.org/Websoft9/docker-$repo_name.git /tmp/docker-$repo_name sudo docker rmi `docker images -aq` -f &>/dev/null || true # Rename compose and env file name @@ -170,7 +171,7 @@ save_images(){ installation(){ sudo rm -rf $install_dir sudo mkdir -p $install_dir /credentials 1>/dev/null 2>&1 && cd $install_dir - sudo git clone https://github.com/Websoft9/docker-$repo_name.git $install_dir + sudo git clone https://github.com/Websoft9/docker-$repo_name.git $install_dir || sudo git clone https://github.com.cnpmjs.org/Websoft9/docker-$repo_name.git $install_dir # Rename compose and env file name cd $install_dir @@ -513,4 +514,4 @@ if [ $make_package = true ]; then save_images add_install_script make_package -fi \ No newline at end of file +fi