Граф коммитов

472 Коммитов

Автор SHA1 Сообщение Дата
Paweł Gronowski c8fc61b958
Update rootless-install to 24.0.0
Release notes: https://github.com/moby/moby/releases/tag/v24.0.0
2023-05-16 20:04:54 +02:00
Sebastiaan van Stijn 2a52adca42
Merge pull request #360 from thaJeztah/rootless_23.0.6
update rootless-install to 23.0.6
2023-05-09 16:53:47 +02:00
Sebastiaan van Stijn 18acea4221
update rootless-install to 23.0.6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-08 13:57:37 +02:00
Sebastiaan van Stijn fcb72050e3
Merge pull request #359 from thaJeztah/assorted_fixes_and_improvements
Assorted fixes and improvements
2023-05-08 13:55:42 +02: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 74caf470d4
Merge pull request #358 from thaJeztah/rootless_24.0.0-rc.2
rootless: update test version to 24.0.0-rc.2
2023-05-07 19:08:49 +02:00
Sebastiaan van Stijn 13fb517010
rootless: update test version to 24.0.0-rc.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-05-07 11:45:21 +02:00
Sebastiaan van Stijn eec5a692af
Merge pull request #357 from thaJeztah/rootless_23.0.5
update rootless-install to 23.0.5
2023-04-26 22:24:03 +02:00
Sebastiaan van Stijn 1aeceea31b
update rootless-install to 23.0.5
release notes: https://github.com/moby/moby/releases/tag/v23.0.5

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-26 22:11:12 +02:00
Sebastiaan van Stijn 07206cb56e
Merge pull request #355 from thaJeztah/rootless_23.0.4
update rootless-install to 23.0.4
2023-04-17 23:18:41 +02:00
Sebastiaan van Stijn 4b02a4b652
Merge pull request #354 from thaJeztah/revert_disable_centos9
Revert "gha: temporarily disable CentOS 9"
2023-04-17 23:18:26 +02:00
Sebastiaan van Stijn edd308c9d6
Revert "gha: temporarily disable CentOS 9"
This reverts commit c435f9da96.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-17 22:31:02 +02:00
Sebastiaan van Stijn c34e125f6b
update rootless-install to 23.0.4
release notes: https://github.com/moby/moby/releases/tag/v23.0.4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-17 22:29:54 +02:00
Sebastiaan van Stijn 350525c3f4
Merge pull request #353 from thaJeztah/rootless_24.0.0-beta.2
rootless: update test version to 24.0.0-beta.2
2023-04-15 13:32:39 +02:00
Sebastiaan van Stijn 220560e9e2
rootless: update test version to 24.0.0-beta.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-15 13:17:47 +02:00
Sebastiaan van Stijn a8a6b338bd
Merge pull request #351 from thaJeztah/rootless_23.0.3
update rootless-install to 23.0.3
2023-04-05 03:02:10 +02:00
Sebastiaan van Stijn 23cca994a4
update rootless-install to 23.0.3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-05 02:59:52 +02:00
Sebastiaan van Stijn 6daecd13c4
Merge pull request #352 from thaJeztah/disable_centos9
gha: temporarily disable CentOS 9
2023-04-05 02:59:10 +02:00
Sebastiaan van Stijn c435f9da96
gha: temporarily disable CentOS 9
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>
2023-04-05 02:55:59 +02:00
Sebastiaan van Stijn 9ebb4c54d6
Merge pull request #350 from thaJeztah/rootless_24.0.0-beta.1
rootless: update test version to 24.0.0-beta.1
2023-04-01 10:55:18 +02:00
Sebastiaan van Stijn 6f87454862
rootless: update test version to 24.0.0-beta.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-01 02:33:04 +02:00
Sebastiaan van Stijn 98a5ca00c4
Merge pull request #349 from thaJeztah/no_scan
remove redundant install for scan-cli-plugin
2023-03-31 12:26: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;
b69ac460a6/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 93bb55b16a
Merge pull request #348 from thaJeztah/update_gha
gha: update distros and version to install
2023-03-29 13:36:48 +02:00
Sebastiaan van Stijn f53d3783c7
Merge pull request #347 from thaJeztah/rootless_23.0.2
update rootless-install to 23.0.2
2023-03-29 13:34:02 +02:00
Sebastiaan van Stijn f529a2b4c2
Makefile: update default test image to ubuntu 22.04
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-28 19:00:15 +02:00
Sebastiaan van Stijn 4e1b4d2418
gha: update distros and version to install
- 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>
2023-03-28 18:59:14 +02:00
Sebastiaan van Stijn 781a0f41d0
gha: update actions/checkout@v3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-28 18:37:51 +02:00
Sebastiaan van Stijn 92a08e1bb9
update rootless-install to 23.0.2
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-28 18:36:16 +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
Sebastiaan van Stijn 0f84e6afbc
Merge pull request #346 from thaJeztah/update_deprecated_distros
print deprecation warning for Fedora 35 and before
2023-03-27 13:59:02 +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 3f7bc2c236
Merge pull request #344 from thaJeztah/rootless_23.0.1
update rootless-install to 23.0.1
2023-03-25 18:29:40 +01:00
Sebastiaan van Stijn c3392ff625
update rootless-install to 23.0.1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-03-25 16:30:19 +01:00
Sebastiaan van Stijn 6647403454
Merge pull request #336 from thaJeztah/simplify_conditionals
deb: simplify version-conditional installs
2023-02-03 10:57:58 +01: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