223 Commits
Author SHA1 Message Date
Nick Janetakis c3499f5784 Deprecate the nightly channel
Signed-off-by: Nick Janetakis <nick.janetakis@gmail.com>
2023-09-09 08:29:47 -04:00
Sebastiaan van Stijn e33616ec76 rewrite instructions
Provide more information how to use the script, its intended purpose, and
limitations of the script.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:56:42 +02:00
Sebastiaan van Stijn 0766385cac add --channel option
Add a --channel option as alternative to the $CHANNEL environment variable;

    ./install.sh --channel test --dry-run
    # Executing docker install script, commit:
    apt-get update -qq >/dev/null
    DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl gnupg >/dev/null
    install -m 0755 -d /etc/apt/keyrings
    curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
    chmod a+r /etc/apt/keyrings/docker.gpg
    echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy test" > /etc/apt/sources.list.d/docker.list
    apt-get update -qq >/dev/null
    DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-ce-rootless-extras docker-buildx-plugin >/dev/null

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:10 +02:00
Sebastiaan van Stijn 40266b3c1e add --version option
Add a --version option as alternative to the $VERSION environment variable;

    ./install.sh --version 20.10
    # Executing docker install script, commit:
    + sh -c apt-get update -qq >/dev/null
    + sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl gnupg >/dev/null
    debconf: delaying package configuration, since apt-utils is not installed
    + sh -c install -m 0755 -d /etc/apt/keyrings
    + sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /etc/apt/keyrings/docker.gpg
    + sh -c chmod a+r /etc/apt/keyrings/docker.gpg
    + sh -c echo "deb [arch=arm64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu jammy stable" > /etc/apt/sources.list.d/docker.list
    + sh -c apt-get update -qq >/dev/null
    INFO: Searching repository for VERSION '20.10'
    INFO: apt-cache madison docker-ce | grep '20.10' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
    INFO: apt-cache madison docker-ce-cli | grep '20.10' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
    + sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce=5:20.10.24~3-0~ubuntu-jammy docker-ce-cli=5:20.10.24~3-0~ubuntu-jammy containerd.io docker-compose-plugin docker-ce-rootless-extras=5:20.10.24~3-0~ubuntu-jammy >/dev/null

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:10 +02:00
Sebastiaan van Stijn a0faa888e8 validate --mirror, and sort options
Produce an error if an unknown mirror is provided. Also sort the options
in the switch.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:10 +02:00
Sebastiaan van Stijn 0731f2f67c validate CHANNEL, and mark "edge" and "nightly" deprecated
The edge channel was already deprecated; the nightly channel has not been
updated for a long time, so (for now) mark it as deprecated as well.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:10 +02:00
Sebastiaan van Stijn 81857de3b2 add deprecation warnings for non-LTS Ubuntu versions that are EOL
Some users confuse "YY.04" versions for LTS versions, and not all users
pay close attention to versions reaching EOL. Print a warning for those
as well, because we no longer publish packages for these.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:10 +02:00
Sebastiaan van Stijn a685296854 remove redundant quotes when resolving versions
These were just noise :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:10 +02:00
Sebastiaan van Stijn 379e81609e SLES: move opensuse_repo variable closer to where it's used
It's only used in a single location, so move it there

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:09 +02:00
Sebastiaan van Stijn 804ce01aca use single-quotes for sed regex-patterns
While I haven't found cases where this caused issues, it probably doesn't
hurt to use single-quotes for these to prevent globbing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:09 +02:00
Sebastiaan van Stijn 766b70c5be prevent globbing when enabling/disabling rpm channels
I ran into this when I ran the script from within `/etc/yum.repos.d`:

    + sh -c 'dnf config-manager --set-disabled docker-ce-*'
    Error: No matching repo to modify: docker-ce-staging.repo.

Took me a bit to understand why the script was failing, and then realized
the shell was expanding `docker-ce-*` to filenames in my current directory;

    ls -l docker-ce-*
    -rw-r--r--. 1 root root 2027 May  6 09:32 docker-ce-staging.repo

This patch quotes the channel name to prevent globbing.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:09 +02:00
Sebastiaan van Stijn 24bb4ae8a0 do not recursively chmod /etc/apt/keyrings
This step in the installation script was added to take non-standard umasks
into account (which is sometimes the case on some cloud providers).

The existing command was changing modes a bit too eagerly, as it recursively
set the "execute" bit, which would not only affect the /etc/apt/keyrings
directory, but also any file inside it (including files we don't own);

    mkdir -m 0700 keyrings
    touch keyrings/one.sh
    touch keyrings/docker.gpg

    ls -al keyrings/
    total 8
    drwx------  4 root root 128 May  7 11:43 .
    drwx------ 17 root root 544 May  7 11:43 ..
    -rw-r--r--  1 root root   0 May  7 11:43 docker.gpg
    -rw-r--r--  1 root root   0 May  7 11:43 one.sh

    chmod -R a+rx keyrings

    ls -al keyrings/
    total 0
    drwxr-xr-x  4 root root 128 May  7 11:43 .
    drwx------ 17 root root 544 May  7 11:43 ..
    -rwxr-xr-x  1 root root   0 May  7 11:43 docker.gpg
    -rwxr-xr-x  1 root root   0 May  7 11:43 one.sh

This patch changes the script to use `install`, which creates the directory
if it doesn't exist, and sets the permissions on the directory itself, without
recursing to files inside it:

    mkdir -m 0700 keyrings2
    touch keyrings2/one.sh
    touch keyrings2/docker.gpg

    ls -al keyrings2/
    total 8
    drwx------ 2 root root 4096 May  7 11:44 .
    drwxr-xr-x 1 root root 4096 May  7 11:44 ..
    -rw-r--r-- 1 root root    0 May  7 11:44 docker.gpg
    -rw-r--r-- 1 root root    0 May  7 11:44 one.sh

    install -m 0755 -d keyrings2/
    total 8
    drwxr-xr-x 2 root root 4096 May  7 11:44 .
    drwxr-xr-x 1 root root 4096 May  7 11:44 ..
    -rw-r--r-- 1 root root    0 May  7 11:44 docker.gpg
    -rw-r--r-- 1 root root    0 May  7 11:44 one.sh

Changing permissions of the `docker.gpg` file itself is already handled
separately through `chmod a+r /etc/apt/keyrings/docker.gpg`.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:09 +02:00
Sebastiaan van Stijn 092c8db70a fix Docker Desktop URL to prevent redirect
The URL was missing a trailing slash, which would cause a redirect:

    curl -I -s https://www.docker.com/products/docker-desktop | grep location:
    location: https://www.docker.com/products/docker-desktop/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:09 +02:00
Sebastiaan van Stijn d08fb9ebee fix version-compare for non-CalVer versions
The script strips leading zeros to accommodate CalVer versions, which
led to an empty when passing a SemVer(ish) version:

    VERSION=23.0.0 ./install.sh --dry-run
    ...
    ./install.sh: 118: [: Illegal number:

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 12:52:06 +02:00
Sebastiaan van Stijn 7637810ffb remove redundant install for scan-cli-plugin
This explict install was added because docker 20.10 did not have an explicit
dependency on the plugin. The current release of the Docker CLI (23.0) already
has a "Recommends:" dependency on the plugin, and 0095742fb5
removed the "--no-install-recommends", so fresh installs of Docker 23.0 will
already install this plugin through that dependency.

Removing the explicit install, because the scan-cli-plugin has been deprecated,
and will no longer receive updates, so we don't want it to be installed for the
upcoming 24.0 release when using this script. see;
https://github.com/docker/scan-cli-plugin/blob/b69ac460a6c23243b858326f0e26f6bd202ca781/internal/deprecation.go#L13-L15

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-31 09:50:47 +02:00
Sebastiaan van Stijn 1faa633ff7 Merge pull request #345 from thaJeztah/add_bookworm
Fix installation on debian testing (bookworm) (carry 327)
2023-03-27 13:59:40 +02:00
Orgad Shaneh d6a9169a9a Fix installation on debian testing (bookworm)
We published packages now for Debian 12 (bookworm) for testing, so we can
update this to use the correct version;
https://download.docker.com/linux/debian/dists/bookworm/pool/stable/amd64/

Co-Authored-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Orgad Shaneh <orgads@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-27 12:54:54 +02:00
Sebastiaan van Stijn 53d51b8ffe print deprecation warning for Fedora 35 and before
Fedora 35 reached EOL on December 13, 2022, and we're no longer
building new packages for it;;

https://docs.fedoraproject.org/en-US/releases/eol/

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-27 12:51:43 +02:00
Sebastiaan van Stijn f7f1ab8d58 deb: simplify version-conditional installs
Now that 0095742fb5 removed the "--no-install-recommends"
option for all packages, we no longer need to special-case installation of the rootless-extras
package.

This patch moves the package together with other conditional packages for 20.10 and up. The
order of these conditionals was updated to match the equivalent steps of the RPM packages.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-02-03 10:49:23 +01:00
Sebastiaan van Stijn 42b0cfaf0c Merge pull request #338 from thaJeztah/sles_remove_rootless_pkg_version
SLES: remove unused rootless_pkg_version
2023-02-03 10:48:49 +01:00
Sebastiaan van Stijn 989df6a284 SLES: remove unused rootless_pkg_version
This variable was introduced in 63fb2060c9, but
was later refactored in ab03892649 aligned the
installation steps for SLES with the other distros (using the version of the
"docker-ce" package itself, as those versions always match).

This patch removes the unused rootless_pkg_version variable, and the code to
resolve that version.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-02-03 10:26:52 +01:00
Sebastiaan van Stijn 0095742fb5 deb: remove --no-install-recommends
The installation for deb packages used a --no-install-recommends to skip "recommended"
packages. This flag was added in ab5553e302 to work around
an issue on Ubuntu 17.10 (which had aufs-tools as recommended dependency), causing the
kernel to be updated.

While "recommended" packages _can_ be omitted during installation, they are
a "strong" recommendation, and should really be installed by default:

> Recommends
>
> This declares a strong, but not absolute, dependency.
> The Recommends field should list packages that would be found together
> with this one in all but unusual installations.

Including the `--no-install-recommends` option could result in `apparmor_parser`
binary (part of the `apparmor` package) to be missing, which would cause
the daemon failing to start on systems with AppArmor support enabled:

    Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: running `apparmor_parser apparmor_parser --version` failed with output:
    error: exec: "apparmor_parser": executable file not found in $PATH
    Error: failed to start containers: somecontainer

This patch removes the `--no-install-recommends` so that the recommended
packages are installed.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-02-03 09:59:44 +01:00
CrazyMax 1cb5c544e2 fix buildx install
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-02-02 21:04:55 +01:00
Sebastiaan van Stijn d32be0ab1d fix matching of package versions on debian, ubuntu, and raspbian
The version-format of the packages changed in the docker-ce-packaging repo;
https://github.com/docker/docker-ce-packaging/commit/39772a761dfdf810cc23a1ec6084ea3100e6abf0

Which caused the script to fail when specifying a version:

    INFO: Searching repository for VERSION '23.0.0-rc.2'
    INFO: apt-cache madison 'docker-ce' | grep '23.0.0.*rc.2.*-0~debian' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3

    ERROR: '23.0.0-rc.2' not found amongst apt-cache madison results

Looking at that search, it seemed like it was overly strict;

- matching the distro (debian, ubuntu, or raspbian), which should not be needed,
  assuming the package repository has been set up correctly (which the script
  does in earlier steps).
- matching the "0" prefix, which was intended to be used a package-revision (so
  to allow for packaging-only releases). That part definitely shouldn't be done,
  as it would not match later revisions (1, 2, 3)

This patch simplifies the matching, and only searches for the package name, and
the version specified, which should satisfy the requirement;

    apt-cache madison 'docker-ce' | grep '23.0.0.*rc.2' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
    5:23.0.0~rc.2-1~ubuntu.22.04~jammy

    apt-cache madison 'docker-ce-cli' | grep '23.0.0.*rc.2' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
    5:23.0.0~rc.2-1~ubuntu.22.04~jammy

With this patch applied, the installation succeeds:

    cat install.sh | DOWNLOAD_URL=https://download-stage.docker.com CHANNEL=test VERSION=23.0.0-rc.2 REPO_FILE=docker-ce-staging.repo sh
    ...
    INFO: Searching repository for VERSION '23.0.0-rc.2'
    INFO: apt-cache madison 'docker-ce' | grep '23.0.0.*rc.2' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
    INFO: apt-cache madison 'docker-ce-cli' | grep '23.0.0.*rc.2' | head -1 | awk '{$1=$1};1' | cut -d' ' -f 3
    + sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends docker-ce=5:23.0.0~rc.2-1~ubuntu.22.04~jammy docker-ce-cli=5:23.0.0~rc.2-1~ubuntu.22.04~jammy containerd.io docker-compose-plugin docker-scan-plugin docker-buildx-plugin >/dev/null

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-01-11 23:41:58 +01:00
Sebastiaan van Stijn 0c9037543e fix "REPO_FILE" checks always running, also with "dry run" enabled
These checks were originally added in 3217c543b4,
which added a `REPO_FILE` variable. While it's with good intent to do a check
if the URL is valid, there are some issues with these checks;

The checks depend on `curl`, but are executed _before_ `pre_reqs` are installed,
so will produce an error if `curl` is not found;

    ./install.sh
    # Executing docker install script, commit:
    ./install.sh: line 469: curl: command not found
    Error: Unable to curl repository file https://download.docker.com/linux/fedora/docker-ce.repo, is it valid?

The checks are currently always performed, also if `DRY_RUN=1` is enabled;

    DRY_RUN=1 REPO_FILE=no-such.repo ./install.sh
    # Executing docker install script, commit:
    Error: Unable to curl repository file https://download.docker.com/linux/fedora/no-such.repo, is it valid?

This patch removes the checks to address the above, and to simplify the script.
Running the script will still fail if an invalid URL is used for the `.repo` file,
which fails the script after the `pre_reqs` are installed;

With this patch:

When running the script with `DRY_RUN=1`:

    DRY_RUN=1 ./install.sh
    # Executing docker install script, commit:
    dnf install -y -q dnf-plugins-core
    dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
    dnf makecache
    dnf install -y -q docker-ce docker-ce-cli containerd.io docker-scan-plugin docker-compose-plugin docker-ce-rootless-extras

When running the script with `DRY_RUN=1` and an invalid repo, the script
completes successfully, but will show the commands it will run, including
the invalid URL:

    DRY_RUN=1 REPO_FILE=no-such.repo ./install.sh
    # Executing docker install script, commit:
    dnf install -y -q dnf-plugins-core
    dnf config-manager --add-repo https://download.docker.com/linux/fedora/no-such.repo
    dnf makecache
    dnf install -y -q docker-ce docker-ce-cli containerd.io docker-scan-plugin docker-compose-plugin docker-ce-rootless-extras

When running the script with an invalid repo URL, it will fail early (after
installing `pre_reqs`:

    REPO_FILE=no-such.repo ./install.sh

    # Executing docker install script, commit:
    + sh -c 'dnf install -y -q dnf-plugins-core'
    ...

    + sh -c 'dnf config-manager --add-repo https://download.docker.com/linux/fedora/no-such.repo'
      Adding repo from: https://download.docker.com/linux/fedora/no-such.repo
      Status code: 404 for https://download.docker.com/linux/fedora/no-such.repo (IP: 65.9.86.56)
      Error: Configuration of repo failed

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-29 14:52:08 +02:00
Prabhav Thali 4d8fdb9633 Adds SLES 15-SP4 support
Signed-off-by: Prabhav Thali <Prabhav.Thali1@ibm.com>
2022-08-29 16:55:22 +05:30
Sebastiaan van Stijn df6b6926dc install docker-buildx-plugin on >= 22.06 (test channel only currently)
The buildx plugin has moved to a separate package for the 22.06 release.
We're currently doing test-builds on staging, so only try to install
this when using both the "test" channel and the staging domain.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-06-07 03:39:16 +02:00
Sebastiaan van Stijn f2979412df Update to use /etc/apt/keyrings per APT maintainers recommendations
See https://tracker.debian.org/news/1305679/accepted-apt-240-source-into-unstable/:

    * Install an empty /etc/apt/keyrings directory.
      This directory is intended to provide an alternative to
      /usr/share/keyrings for placing keys used with signed-by.

See also https://wiki.debian.org/DebianRepository/UseThirdParty?action=diff&rev2=47&rev1=46
(which was edited following a discussion with the APT maintainers about the expected usage):

> If future updates to the key will be managed by an apt/dpkg package as
> recommended below, then it SHOULD be downloaded into `/usr/share/keyrings`
> using the same filename that will be provided by the package. If it will
> be managed locally , it SHOULD be downloaded into `/etc/apt/keyrings` instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-24 15:59:20 +02:00
Sebastiaan van Stijn a77c28b7fc Explicitly install containerd.io to handle upgrades
While the script isn't intended for updating existing installations,
some users use it for that purpose, and when doing so may end up in
a situation where only the docker packages are updated, but containerd
is kept at the already installed version.

This patch explicitly installs the containerd.io package so that running
the script on an existing installation also updates the containerd.io
package to the latest version.

Docker packages before 18.09 bundled containerd in the docker-ce package,
so this step is made options based on the version that's requested to be
installed (defaults to "latest").

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-10 12:50:11 +02:00
Prabhav Thali f3ba5b5669 fix zypper command syntax
Signed-off-by: Prabhav Thali <Prabhav.Thali1@ibm.com>
2022-05-04 17:45:55 +05:30
Debdut Chakraborty 90d0bdf7b6 Add docker-compose-plugin package
Signed-off-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-25 20:10:40 +02:00
Sebastiaan van Stijn ab03892649 align approach for packages to install between rpm and deb steps
This aligns the approach taken between rpm- and deb-based installations to first
collect the list of packages to install in a `$pkgs` variable, and then install
them all, instead of executing an install for each of them.

With this change:

Fedora

    DRY_RUN=1 ./install.sh
    # Executing docker install script, commit:
    dnf install -y -q dnf-plugins-core
    dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
    dnf makecache
    dnf install -y -q docker-ce docker-ce-cli docker-scan-plugin docker-ce-rootless-extras

CentOS

    DRY_RUN=1 ./install.sh
    # Executing docker install script, commit:
    yum install -y -q yum-utils
    yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    yum makecache
    yum install -y -q docker-ce docker-ce-cli docker-scan-plugin docker-ce-rootless-extras

Ubuntu

    DRY_RUN=1 ./install.sh
    # Executing docker install script, commit:
    apt-get update -qq >/dev/null
    DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl gnupg >/dev/null
    curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | gpg --dearmor --yes -o /usr/share/keyrings/docker-archive-keyring.gpg
    chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg
    echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu focal stable" > /etc/apt/sources.list.d/docker.list
    apt-get update -qq >/dev/null
    DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends  docker-ce-cli docker-scan-plugin docker-ce >/dev/null
    DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce-rootless-extras >/dev/null

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-04-25 18:25:58 +02:00
e5f4d99c75 install.sh: set read-permissions for environments with non-standard umask
Some environments may have a non-standard (non 022) umask set, in which case
the keyring would not get read-permissions for all users, which lead to errors
during install:

    W: GPG error: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8

This commit changes the permissions of the file, so that it's world-readable.
See https://stackoverflow.com/a/68764068

Co-Authored-By: ManhIT <manhit@s-developers.com>
Co-Authored-By: Hervé M <hmag@users.noreply.github.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-03-21 15:56:26 +01:00
Sebastiaan van Stijn 93d2499759 Merge pull request #250 from linux-on-ibm-z/s390x-sles-changes
Added a generic fix for enabling SLES repos
2021-08-20 09:42:47 +02:00
anujajakhade 09607b8fc4 Added a generic fix for enabling SLES repos
Signed-off-by: Anuja Jakhade <anujajakhade@gmail.com>
2021-08-20 04:19:45 +00:00
Mohamed Meabed a49ecdef76 Fix non-interactive installation
gpg prompt for overwriting the keyring file - adding `--yes` will fix it
```
You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/debian/gpg" | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
File '/usr/share/keyrings/docker-archive-keyring.gpg' exists. Overwrite? (y/N)
```

Signed-off-by: Mohamed Meabed <mo.meabed@gmail.com>
2021-08-19 18:01:30 -04:00
Sebastiaan van Stijn 0e685c6ac0 Merge pull request #248 from thaJeztah/carry_239_s390x_script
Added support for sles (s390x) in installation script (carry 239)
2021-08-09 10:09:40 +02:00
anujajakhade 63fb2060c9 Added support for sles (s390x) in installation script
Signed-off-by: Anuja Jakhade <anujajakhade@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-09 10:03:48 +02:00
YadominJintaandSebastiaan van Stijn 265aebf0c0 apt-key is deprecated
Co-authored-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: YadominJinta <i@yadom.in>
2021-07-31 00:07:40 +02:00
YadominJinta b7f48ab89e add debian bullseye support
Signed-off-by: YadominJinta <i@yadom.in>
2021-07-18 01:51:10 +08:00
Sebastiaan van Stijn 5e579a63d7 remove "add_debian_backport_repo()", as it's no longer in use
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-05 20:37:49 +02:00
Sebastiaan van Stijn 3beefb7275 remove code for Debian Jessie and "Kali Linux"
Jessie reached EOL quite some time ago, and we do not support
Debian/Ubuntu derrivatives, so removing code for Kali Linux.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-05 20:09:52 +02:00
Sebastiaan van Stijn c1f1c9c6ae Add deprecation warning for Ubuntu Xenial (16.05) and other EOL distro versions
This adds a deprecation warning for distro versions that reached EOL, and for
which we no longer maintain updates.

Note that the list of versions for which we produce warnings is not "complete",
and only contains versions that either reached EOL recently, or LTS versions
that may still be commonly in use.

With this patch;

Running inside a fedora:32 container:

    DEPRECATION WARNING
        This Linux distribution (fedora 32) reached end-of-life and is no longer supported by this script.
        No updates or security fixes will be released for this distribution, and users are recommended
        to upgrade to a currently maintained version of fedora.

    Press Ctrl+C now to abort this script, or wait for the installation to continue.
    ^C

Running inside an ubuntu:xenial container:

    DEPRECATION WARNING
        This Linux distribution (ubuntu xenial) reached end-of-life and is no longer supported by this script.
        No updates or security fixes will be released for this distribution, and users are recommended
        to upgrade to a currently maintained version of ubuntu.

    Press Ctrl+C now to abort this script, or wait for the installation to continue.
    ^C

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-07-04 13:17:19 +02:00
Sebastiaan van Stijn 92cec076fa deb: explicitly install docker-ce-cli, scan-plugin, and docker-ce
The scripts is using "--no-install-recommends" to provide a more
minimal install, and to prevent installing "latest" version of
(e.g.) the engine when installing the CLI.

This patch:

- adds some utilities to compare versions
- skips CLI-version discovery on older versions (before 18.09)
  which did not have separate packages for the CLI
- on versions 20.10 and up (or if no version was specified), also
  install the scan cli plugin (support for cli plugins was added
  in docker 19.03, but not installing on that version by default))

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-03 18:23:55 +02:00
Sebastiaan van Stijn 666023805e remove warning about pre-1.10 update
When upgrading docker from versions older than v1.10, the image
store must be migrated for the content-addressable store.

Docker 1.10 was released more than 5 years ago, so people running
versions older than that, probably have more urgent things to
be concerned about, so removing this warning.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-06-03 16:33:57 +02:00
Sebastiaan van Stijn b5567e71b7 Update "post-install" output
- use "/go/" redirect URLs for links to docs.docker.com, which are
  easier to remember, and allows us the flexibility to point them
  to new locations in the docs if content is moved.
- remove instructions for giving non-root access,  and instead
  include a link to the documentation. The existing "usermod"
  instruction may not be complete, and may not work on all
  platforms, so providing a link to the documentation allows
  us to go more into depth.
- remove the (now unused) $your_user variable
- Update the "daemon attack surface" warning to mention
  "privileged Docker daemon", to make clear that this is
  mostly (only) a concern if the daemon is not running
  rootless.
- Wrapped / rephrased the output to make sure it fits in
  80-characters (to prevent unwanted wrapping)
- Fixed / updated some other links while at it.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-25 11:52:15 +01:00
Akihiro Suda e5b163217e install.sh: promote Rootless mode over "sudo usermod -aG docker me"
Fix issue 210

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-02-15 13:02:29 +09:00
Akihiro Suda 7ac13ea193 install.sh: install docker-ce-rootless-extras explicitly
Fix issue 212

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-02-15 13:02:29 +09:00
Sebastiaan van Stijn b84b90a723 make install.sh executable
this shouldn't affect users downloading, but makes it easier
to debug the script while making changes.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-09-24 14:08:45 +02:00
Stefan Scherer d09f5ddf06 Cleanup unsupported dists
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
2020-05-14 14:36:39 +02:00