Allow users to opt into installing the docker-sbx package alongside
the standard Docker Engine packages by setting SBX=1, for example:
curl -fsSL https://get.docker.com | sudo SBX=1 sh
This mirrors the existing pattern used by other env vars (CHANNEL,
VERSION, etc.) and adds the docker-sbx package to the apt and
dnf/yum install package lists when SBX is set to "1".
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
Make sure both pkg_version and cli_pkg_version are only set on success
to prevent them containing a bare "=", which we were stripping later on.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>