Skip to content

fix: fall back to the latest Docker when the pinned version is unavailable in install.sh - #203

Merged
Siumauricio merged 1 commit into
Dokploy:mainfrom
blacksoxx:installer-docker-version-fallback
Oct 21, 2026
Merged

Siumauricio merged 1 commit into
Dokploy:mainfrom
blacksoxx:installer-docker-version-fallback

Conversation

@blacksoxx

Copy link
Copy Markdown
Contributor

What is this PR about?

On Ubuntu 26.04 the Docker apt repository only carries 29.x, so get.docker.com with the 28.5.0 pin prints ERROR: '28.5.0' not found amongst apt-cache madison results and exits before installing anything. install.sh ignores that exit status, puts holds on packages that were never installed and keeps going until docker swarm init fails with docker: not found.

This keeps 28.5.0 as the preferred version. When get.docker.com fails for it, the script retries without a version so the newest docker-ce the repository offers is installed, prints the installed version, and stops with a clear error before the swarm step if Docker is still not on the PATH. The existing apt-mark hold then pins whatever version was installed, which is what #100 asked for. The remote server setup in Dokploy/dokploy#4660 already moved Ubuntu 26.04 to 29.x, so this brings the public installer in line with it. If you would rather pin 29.x explicitly for 26.04 the way #4660 did, the fail fast part stands on its own.

Tested by running the Docker block of the script under dash as root in containers (no daemon there, so the check stops at version resolution and the PATH check):

  • ubuntu:26.04: the pin is rejected, the retry installs docker-ce 29.9.1, docker is on the PATH and the holds are set
  • ubuntu:24.04: 28.5.0 is found and installed, no retry
  • ubuntu:26.04 with the current script: reproduces the report, docker: not found at the swarm step
  • get.docker.com failing on both attempts: exits 1 with "Error: Docker installation failed" before the swarm step

shellcheck reports no new findings.

Issues related

Closes Dokploy/dokploy#5471

…lable 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 <youssef.bouden2002@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: Ubuntu 26.04 installer still requests Docker 28.5.0 in v0.30.6

2 participants