Ubuntu 26.10 (stonking) images no longer ship /etc/lsb-release, and
the base image has no lsb_release command.
Both codename lookups returned nothing, so the apt source line had no
suite and apt-get update failed:
```
deb [...] https://download-stage.docker.com/linux/ubuntu test
E: Malformed entry 1 in list file /etc/apt/sources.list.d/docker.list (Component)
```
Read VERSION_CODENAME from /etc/os-release first, which every supported
Ubuntu release provides and get_distribution already relies on.
lsb_release and /etc/lsb-release remain as fallbacks when os-release has
no codename.
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
Some systems use nf_tables instead of ip_tables in
which case ip_tables may not be loaded.
Only one of ip_tables or nf_tables is checked
based on the output of `iptables --version`
Signed-off-by: ankumeah <ankitku00ish@gmail.com>
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>