Looks like their package repositories are having a bad day, or changes
were made (again);
# Executing docker install script, commit: 60327925bf2a9c6f81084661b0c05edc8263a3c9
+ sh -c 'yum install -y -q yum-utils'
Error: Failed to download metadata for repo 'baseos': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>
- updating the "version" to install to 20.10 (previous version)
- remove ubuntu 18.04, as it's EOL soon
- add last 2 LTS versions of Ubuntu
- add centos:9 (stream)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
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>
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>
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>
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>