Repository navigation
fix: fall back to the latest Docker when the pinned version is unavailable in install.sh - #203
Merged
Siumauricio merged 1 commit intoOct 21, 2026
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 resultsand exits before installing anything.install.shignores that exit status, puts holds on packages that were never installed and keeps going untildocker swarm initfails withdocker: 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 holdthen 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):
dockeris on the PATH and the holds are setdocker: not foundat the swarm stepshellcheck reports no new findings.
Issues related
Closes Dokploy/dokploy#5471