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>
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>
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>
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>
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>
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>
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>
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;
b69ac460a6/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>
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>
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>