289 Commits
Author SHA1 Message Date
Paweł Gronowski 6937af6a11 install: Add AlmaLinux and Oracle Linux support
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-11-06 03:52:53 +01:00
Paweł Gronowski af185b580a install: Detect Ubuntu codename without /etc/lsb-release
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>
2026-10-13 18:48:51 +02:00
Paweł Gronowski bb2fcbb528 install: Deprecate Debian 11 Bullseye
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-09-09 14:20:41 +02:00
H Dub aa0cf12dc0 Add setup-repo and no-autostart to install.sh usage statement
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
2026-08-19 14:00:23 -05:00
H Dub 3e7785d73b Comment new function usage() per Coding Style guide
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
2026-08-19 14:00:22 -05:00
H Dub e85245de80 Add --help flag to install.sh and usage function
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
2026-08-19 14:00:17 -05:00
H Dub dfd6bdea56 Exit 1 when illegal option rather than do install
Signed-off-by: H Dub <14808878+hdub-tech@users.noreply.github.com>
2026-08-19 13:59:17 -05:00
Eric Curtin a02aa0bdb5 Add SBX env var to install docker-sbx package
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>
2026-08-11 13:56:20 +01:00
Paweł Gronowski 8c063cbce4 Deprecate Ubuntu 25.10 Questing
It's EOL

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-08-10 18:31:20 +02:00
Sebastiaan van Stijn 0d6dc3deb8 deb: set "--allow-downgrades" if a specific version is requested
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-07-13 14:18:40 +02:00
Sebastiaan van Stijn ae0db934a1 prevent bare "=" as version
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>
2026-07-13 12:30:59 +02:00
Sebastiaan van Stijn 59f81eb7e4 move vars closer to where used
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-07-13 12:30:22 +02:00
Sebastiaan van Stijn 032958bf84 always declare cli_pkg_version
No real impact, but `$cli_pkg_version` was used unconditionally,
but was set conditionally.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-07-13 12:25:53 +02:00
Sebastiaan van Stijn 8564e27fc7 fix indentation
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-07-13 12:14:40 +02:00
sanyogdeshmukh 96b9d34d3d Re-enable RHEL support on s390x
Signed-off-by: sanyogdeshmukh <cok202p2@gmail.com>
2026-07-06 10:56:45 +00:00
Paweł Gronowski 60d4787004 Merge pull request #565 from nanookclaw/fix/raspbian-trixie-debian-repo
fix: use Debian repo for Raspbian Trixie
2026-06-30 17:12:19 +02:00
Eric Curtin b1691976bd Normalize Fedora Asahi Remix to Fedora
So installs work on Fedora Asahi Remix

Signed-off-by: Eric Curtin <eric.curtin@docker.com>
2026-06-30 14:46:52 +01:00
Nanook 55a1d1a8b4 fix: use Debian repo for Raspbian Trixie
Signed-off-by: Nanook <nanookclaw@users.noreply.github.com>
2026-06-14 22:12:07 +00:00
Paweł Gronowski aa9f363f56 install: Deprecate Fedora < 43
Fedora versions older than 43 are now EOL for this installer path.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-06-11 16:47:40 +02:00
Paweł Gronowski f2b0ef96e1 Merge pull request #556 from vlivyur/master
install.sh: Actually start Docker daemon via systemctl
2026-04-24 21:02:28 +02:00
vlivyur bb4b1327ee Actually start Docker daemon via systemctl
Signed-off-by: vlivyur <vlivyur@gmail.com>
2026-04-23 21:02:59 +04:00
Paweł Gronowski 7cdeb5d895 install: Skip "docker already installed" warning in REPO_ONLY mode
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>
2026-04-09 11:36:19 +02:00
Paweł Gronowski 86f94af03c Prepare for Rocky Linux
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-03-30 20:29:10 +02:00
Orgad Shaneh 6db0aea6fb Fix installation on debian testing (forky)
forky dist is not deployed, so use trixie instead.

This is similar to #327.

Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com>
2025-12-11 12:41:33 +02:00
Gajesh Bhat 7d4c5e207f Automatically start Docker daemon after installation by default
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>
2025-12-09 20:56:15 -08:00
Paweł Gronowski 9b2cd0e08d Add --setup-repo option to configure repositories without installing packages
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>
2025-09-18 13:55:29 +02:00
Paweł Gronowski 5e7df430ba Deprecate Ubuntu 24.10 (Oracular)
Reached EOL in July 2025

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-09-16 13:31:02 +02:00
Rejean Groleau 4ff191b115 Avoid installing missing packages for version 23
On ubuntu bionic and focal (and debian buster too), the docker-model-plugin
package is missing. The suggestion was to just install the package named
docker-buildx-plugin in the version 23 check, while moving the missing
package docker-model-plugin to a new version 28.2 check. The number was
chosen because that package becomes available starting with version 28.2
on ubuntu jammy (while not available in version 28.1 on ubuntu focal).

See: https://github.com/docker/docker-install/issues/509

Signed-off-by: Rejean Groleau <rejeangroleau@gmail.com>
2025-07-16 08:22:42 -04:00
Sebastiaan van Stijn 90929a58e1 install "docker-model-plugin"
Install the model-runner CLI plugin.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-29 00:26:04 +02:00
Sebastiaan van Stijn 51fb914658 Merge pull request #493 from thaJeztah/deprecated_distros
add ubuntu 20.04 "focal" (LTS) to list of EOL distros, use docker 27.5 for versioned install
2025-05-20 21:55:25 +02:00
Sebastiaan van Stijn 25acbbfff5 add deprecation notice for Fedora 40 (EOL)
Fedora 40 reached EOL on May 13, 2025;
https://docs.fedoraproject.org/en-US/releases/eol/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-20 19:44:10 +02:00
Sebastiaan van Stijn 0647bbe981 add ubuntu 20.04 "focal" (LTS) to list of EOL distros
Ubuntu 20.04 reached end of support on April 30. There's still commercial
ESM (Extended Security Maintenance) support, but we don't account for that
in our packages; https://ubuntu.com/blog/ubuntu-20-04-eol-for-devicesional

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-05-20 18:27:26 +02:00
Sebastiaan van Stijn 5fed27b90c Merge pull request #480 from vvoland/fedora-staging
install: Default to staging repo file for staging download URL
2025-04-17 14:17:48 +02:00
Paweł Gronowski ce4b2cb51f install: Default to staging repo file for staging download URL
When using a staging download URL (containing "-stage" in the URL), and
no explicit repo was provided automatically use the staging repo file as
well.

So it's sufficient to do:

```
curl -L get.docker.com | DOWNLOAD_URL="https://download-stage.docker.com" sh -
```

instead of
```
curl -L get.docker.com | REPO_FILE="docker-ce-staging.repo" DOWNLOAD_URL="https://download-stage.docker.com" sh -
```

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-17 14:14:26 +02:00
Paweł Gronowski 1b7f56e407 install.sh: Add Debian "Trixie"
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2025-04-09 17:32:41 +02:00
Prabhav Thali 4cccc20bec drop SLES & RHEL support
Signed-off-by: Prabhav Thali <Prabhav.Thali1@ibm.com>
2025-02-24 17:00:37 +05:30
Sebastiaan van Stijn 8c7ed6bd84 rpm: always replace existing repo-configuration
The installation script's main purpose is to perform a fresh install, because
it's not guaranteed to work correctly when updating an existing installation,
and we print a warning if we find docker is already installed. However, it's
known that the script is used to update existing installations.

The current script has some limitations for the update scenario;

- When using the script for installing from the staging domain, the existing
  repo configuration is not overwritten. When using `yum`, or older `dnf` versions
  this resulted in 2 separate repo files to be created (docker-ce.repo and
  docker-ce-staging.repo), which resulted in errors due to duplicate repo
  definitions with the same name.
- When using `dnf5`, we specified the filename to store the configuration,
  which resulted in an error;

        + sh -c 'dnf5 config-manager addrepo --save-filename=docker-ce.repo --from-repofile='\''https://download-stage.docker.com/linux/fedora/docker-ce-staging.repo'\'''
          File "/etc/yum.repos.d/docker-ce.repo" already exists and configures repositories with IDs "docker-ce-stable docker-ce-stable-debuginfo docker-ce-stable-source docker-ce-test docker-ce-test-debuginfo docker-ce-test-source docker-ce-nightly docker-ce-nightly-debuginfo docker-ce-nightly-source". Add "--overwrite" to overwrite.

  - On SLES, it would result in a similar error;

        + sh -c 'zypper addrepo https://download-stage.docker.com/linux/sles/docker-ce-staging.repo'
          Adding repository 'Docker CE Nightly - s390x' ......................................................................................[error]
          Repository named 'docker-ce-nightly' already exists. Please use another alias.
          Adding repository 'Docker CE Nightly - Debuginfo s390x' ............................................................................[error]
          Repository named 'docker-ce-nightly-debuginfo' already exists. Please use another alias.

This patch updates the script to overwrite / replace the existing repo config.
This brings the rpm-based installations in line with the Debian approach, which
unconditionally overwrites `/etc/apt/sources.list.d/docker.list`.

It's worth noting that this change will therefore overwrite any customisations
made to the repo-configurations, so a warning is added for that.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-12-05 14:04:30 +01:00
Sebastiaan van Stijn 103814e385 add deprecation warning for Fedora 39 and older
Fedora 39 and older reached EOL

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-14 14:27:29 +01:00
Sebastiaan van Stijn c8e03d723e Remove workaround for dnf5 addrepo bug
This reverts commit 27f47c592a.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-11-04 16:43:33 +01:00
rajdeep1008 83b23cede1 "yum config-manager" to "yum-config-manager"
Signed-off-by: rajdeep1008 <iamrajdeep1008@gmail.com>
2024-09-24 12:16:27 +05:30
Sebastiaan van Stijn 65cca2fde3 use double-quotes to make output more readable
commit 766b70c5be quoted these values to
prevent globbing, but used single quotes. However, these commands are
executed with `sh -c` using single quotes, which makes the output hard
to read because of the embedded quotes being escaped.

This patch changes to use double-quotes, which should still prevent
globbing to happen, but make the output more readable.

Before:

    CHANNEL=test ./install.sh
    ...
    Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
    + '[' test '!=' stable ']'
    + sh -c 'dnf config-manager --set-disabled '\''docker-ce-*'\'''
    + sh -c 'dnf config-manager --set-enabled '\''docker-ce-test'\'''
    + sh -c 'dnf makecache'

After:

    CHANNEL=test ./install.sh
    ...
    Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
    + '[' test '!=' stable ']'
    + sh -c 'dnf config-manager --set-disabled "docker-ce-*"'
    + sh -c 'dnf config-manager --set-enabled "docker-ce-test"'
    + sh -c 'dnf makecache'

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-12 10:15:43 +02:00
Sebastiaan van Stijn 27f47c592a add workaround for dnf5 addrepo bug
The addrepo command has a bug that causes it to fail if the `.repo` file
contains empty lines, causing it to fail;

    dnf config-manager addrepo --from-repofile="https://download.docker.com/linux/fedora/docker-ce.repo"
    Error in added repository configuration file. Cannot set repository option "#1=
    ": Option "#1" not found

Use a temporary file and strip empty lines as a workaround until the bug
is fixed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 13:01:16 +02:00
Sebastiaan van Stijn 5cf619df82 don't install weak-dependencies for dnf-core-utils
We only need the config-manager, but it comes with a large number of weak
dependencies;

    dnf -q install dnf-plugins-core
    Transaction Summary:
    Installing:       78 packages

Disable weak dependencies to skip those, as they're not essential for this
script;

    dnf -q --setopt=install_weak_deps=False install dnf-plugins-core
    Transaction Summary:
    Installing:       32 packages

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 13:00:07 +02:00
Sebastiaan van Stijn b9824740ec add support for dnf5
Fedora 41 and up use the new dnf5 as default, which is a rewrite of
the dnf commands with different options;

    + dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
      Unknown argument "--add-repo" for command "config-manager". Add "--help" for more information about the arguments.
      make: *** [Makefile:95: verify] Error 2
      script returned exit code 2

This patch:

- adds a check for dnf5
- removes some indirection through env-vars, and instead inlines the code

Note that with CentOS 7 being EOL, we can probably remove the `yum` variant
from the script, but I left those in place for now.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 12:59:10 +02:00
Sebastiaan van Stijn 4e6553081c apt-get: set global options before command
The `-y` and `-q` options are global options, and can be set before the
command that's run;

    apt-get --help
    ...
    Usage: apt-get [options] command
           apt-get [options] install|remove pkg1 [pkg2 ...]
           apt-get [options] source pkg1 [pkg2 ...]

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 16:12:23 +02:00
Sebastiaan van Stijn d56da2bc4b dnf, yum: set global options before command
The `-y` and `-q` options are global options, and can be set before the
command that's run. There's some ambiguity in the USAGE output of different
versions (`yum`, `dnf`, `dnf5`)

yum always outputs the same usage, but shows that options go _before_
the command;

    yum --help
    Usage: yum [options] COMMAND

    yum install --help
    Usage: yum [options] COMMAND

dnf (dnf4) is ambiguous; when showing usage for `install` it shows the
options to be set _after_ the command;

    dnf install --help
    usage: dnf install [-c [config file]] [-q] [-v] [--version] ....

but the global `--help` shows them to be before the command;

    dnf --help
    usage: dnf [options] COMMAND

    General DNF options:
      ...
      -q, --quiet           quiet operation
      -v, --verbose         verbose operation
      ,,,
      --setopt SETOPTS      set arbitrary config and repo options

dnf5 is more explicit about global vs per-command options;

    dnf --help
    Usage:
      dnf5 [GLOBAL OPTIONS] <COMMAND> ...

    dnf install --help
    Usage:
      dnf5 [GLOBAL OPTIONS] install [OPTIONS] [ARGUMENTS]

Testing shows that older versions (`dnf4` and `yum`) handle both fine,
and because `dnf5` (per the above) prefers global options to go before
the command, we can use that convention in this script.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-04 16:09:29 +02:00
Sebastiaan van Stijn 5f7139b2bc add deprecation warning for Ubuntu 23.10 (Mantic Minotaur) (EOL: July 11, 2024)
Ubuntu 23.10 reached EOL on July 11, 2024: https://fridge.ubuntu.com/2024/07/17/ubuntu-23-10-mantic-minotaur-reached-end-of-life-on-july-11-2024/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-24 10:04:22 +02:00
Sebastiaan van Stijn 0692978b95 Merge pull request #435 from thaJeztah/update_deprecated_distros
add deprecation warnings for Ubuntu 18.04 (bionic), Debian, Raspbian 10 Buster, Fedora <= 38, and CentOS (Stream) 8
2024-07-22 23:26:43 +02:00
Sebastiaan van Stijn c10af070c5 Merge pull request #434 from thaJeztah/remove_apt_transport_https
remove apt-transport-https from pre_reqs
2024-07-22 23:25:39 +02:00
Sebastiaan van Stijn 9f22ef3ba5 remove check for RHEL only being available on s390x
This check was added in 63fb2060c9, at which
time we did not provide packages fro RHEL on architectures other than s390x.

We now provide packages for RHEL 8 and 9 for amd64 (x86), arm64, and s390x,
so we can remove this check.

Note that we do not (yet?) provide packages for ppc64le, but this is more
of a niche use-case, so not adding a special condition for that, as we
don't provide that check for other distros.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-07-22 12:01:50 +02:00