The release list is already ordered newest first, so the test channel
only needs to consider releases that are either prereleases or the
latest stable release.
This keeps test from resolving to an older prerelease after a newer
stable release is published.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Add 29.4.2 to the package install test matrix so it is verified across
all tested distributions.
Expand test-install-rootless to run both channels (test and stable).
The stable entry pins STABLE_LATEST=29.4.2 so the static binary URL
workaround (docker-29.4.2-2.tgz) is exercised during CI.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
The static binary tarball for Docker 29.4.2 was re-released with a
"-2" suffix. Add a static_release_version() helper that maps version
numbers to their actual tarball name, so that 29.4.2 resolves to
docker-29.4.2-2.tgz instead of docker-29.4.2.tgz.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
When REPO_ONLY=1, the script only sets up the package repository and
exits. There's no reason to warn about Docker being already installed or
sleep for 20 seconds in that case.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This PR makes the Docker daemon start automatically after installation
by default, with a --no-autostart opt-out flag. This addresses issue #124
and aligns with the "opinionated convenience" philosophy of get.docker.com.
Changes:
- Autostart enabled by default (AUTOSTART=1)
- Added --no-autostart flag to opt-out
- Smart systemd detection using /run/systemd/system directory check
- Falls back to traditional service management (service/chkconfig/update-rc.d)
- Uses sh_c pattern for proper dry-run support
- All informational messages output to stderr
The systemd detection checks for /run/systemd/system directory which only
exists when systemd is actually running as PID 1. This prevents failures
in container environments where systemctl is installed but systemd is not
running.
Tested across all supported distributions:
- Ubuntu (20.04, 22.04, 24.04)
- Debian (11, 12)
- CentOS Stream (8, 9)
- Fedora (40, 41)
- RHEL/AlmaLinux (8, 9)
Fixes#124
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Gajesh Bhat <gajeshbht@gmail.com>
When building the final install.sh script - fill the latest versions
based on Github releases.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Running in subshell doesn't automatically propagate its exit code to the
parent shell (even with `set -e`).
This made the `make test` command NOT exit with a non-zero exit code if
the test actually failed.
Also drop `tail` call because it's actually better to have the full
trace.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
The `--setup-repo` flag allows users to add Docker package repositories
to without automatically installing Docker packages.
This is useful for scenarios where users want to configure the
repository but handle package installation separately.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>