From e81115db352f3812997ff1536aef4410743ff4f1 Mon Sep 17 00:00:00 2001 From: Youssef Omar Bouden Date: Tue, 20 Oct 2026 14:56:19 +0100 Subject: [PATCH] fix: fall back to the latest Docker when the pinned version is unavailable in install.sh On Ubuntu 26.04 the Docker apt repository only carries 29.x, so get.docker.com with the 28.5.0 pin exits before installing anything. install.sh ignored that exit status, put holds on packages that were never installed and kept going until docker swarm init failed with docker: not found. Keep 28.5.0 as the preferred version, retry without a version when it is unavailable so the newest docker-ce the repository offers is installed, and stop with a clear error before the swarm step if Docker is still missing. Signed-off-by: Youssef Omar Bouden --- apps/website/public/install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/apps/website/public/install.sh b/apps/website/public/install.sh index 17e9f7c8..2c0743d4 100644 --- a/apps/website/public/install.sh +++ b/apps/website/public/install.sh @@ -139,7 +139,18 @@ install_dokploy() { if command_exists docker; then echo "Docker already installed" else - curl -sSL https://get.docker.com | sh -s -- --version $DOCKER_VERSION + # get.docker.com exits without installing anything when the pinned version + # is missing from the distro repository (Ubuntu 26.04 only ships 29.x) + if ! curl -sSL https://get.docker.com | sh -s -- --version $DOCKER_VERSION; then + echo "Docker $DOCKER_VERSION could not be installed, retrying with the latest version from the Docker repository" + curl -sSL https://get.docker.com | sh + fi + if ! command_exists docker; then + echo "Error: Docker installation failed" >&2 + echo "Please install Docker manually (https://docs.docker.com/engine/install/) and run the installer again" >&2 + exit 1 + fi + echo "Installed $(docker --version)" # Hold docker packages to prevent unintended upgrades (apt-based distros only) if command_exists apt-mark; then apt-mark hold docker-ce docker-ce-cli docker-ce-rootless-extras