diff --git a/bin/deploy-hobby b/bin/deploy-hobby index 7040bec622a42..1c20beaf37489 100755 --- a/bin/deploy-hobby +++ b/bin/deploy-hobby @@ -166,14 +166,21 @@ EOF chmod +x compose/wait # setup docker -echo "Setting up Docker" -sudo apt install -y apt-transport-https ca-certificates curl software-properties-common -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo -E apt-key add - -sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" -sudo apt update -sudo apt-cache policy docker-ce -sudo apt install -y docker-ce - +# setup docker +# Check if Docker is already installed +if ! command -v docker &> /dev/null; then + echo "Docker is not installed. Setting up Docker." + + # Setup Docker + sudo apt install -y apt-transport-https ca-certificates curl software-properties-common + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo -E apt-key add - + sudo add-apt-repository -y "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" + sudo apt update + sudo apt-cache policy docker-ce + sudo apt install -y docker-ce +else + echo "Docker is already installed. Skipping installation." +fi # setup docker-compose echo "Setting up Docker Compose"