diff --git a/install/install_docker.sh b/install/install_docker.sh index d3d4f77b..7ebca006 100644 --- a/install/install_docker.sh +++ b/install/install_docker.sh @@ -50,7 +50,6 @@ docker_exist() { return 0 } - Install_Docker(){ echo "$echo_prefix_docker Installing Docker for your system" @@ -61,6 +60,7 @@ Install_Docker(){ curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh else # For other distributions + sudo yum install yum-utils -y > /dev/null sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo yum install $docker_packages -y fi @@ -68,7 +68,6 @@ Install_Docker(){ # For Ubuntu, Debian, or Raspbian if type apt >/dev/null 2>&1; then - apt update # Wait for apt to be unlocked curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh fi @@ -90,17 +89,30 @@ if docker_exist; then elif [ $yum_status -eq 0 ]; then sudo yum update -y $docker_packages elif [ $apt_status -eq 0 ]; then + sudo apt update -y sudo apt -y install --only-upgrade $docker_packages else echo "Docker installed, but cannot upgrade" fi else - export -f Install_Docker - timeout 300 bash -c Install_Docker - if [ $? -eq 124 ]; then - echo "Install Docker timed out, Docker packages maybe can't download" - exit 1 - fi + + max_retries=3 + retry_count=0 + + while ((retry_count < max_retries)); do + Install_Docker + if [ $? -ne 0 ]; then + echo "Installation timeout or failed, retrying..." + ((retry_count++)) + else + echo "Docker installed successfully." + exit 0 + fi + done + + echo "Docker Installation failed after $max_retries retries." + exit 1 + fi } diff --git a/version.json b/version.json index 4fca4be2..095451a4 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "version": "0.8.26-rc69", + "version": "0.8.26-rc70", "plugins": { "portainer": "0.0.7", "nginx": "0.0.5",