Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- quay.io/centos/centos:stream9
version:
- "27.5"
- "29.4.2"
- ""

steps:
Expand All @@ -31,13 +32,21 @@ jobs:
test-install-rootless:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
channel:
- test
- stable
include:
- channel: stable
stable_latest: "29.4.2"
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Install rootless
env:
GH_TOKEN: ${{ github.token }}
run: |
sudo sh -c 'echo 0 > /proc/sys/kernel/apparmor_restrict_unprivileged_userns'
make build/test/rootless-install.sh
FORCE_ROOTLESS_INSTALL=1 ./build/test/rootless-install.sh

make build/${{ matrix.channel }}/rootless-install.sh \
${{ matrix.stable_latest && format('STABLE_LATEST={0}', matrix.stable_latest) || '' }}
FORCE_ROOTLESS_INSTALL=1 ./build/${{ matrix.channel }}/rootless-install.sh
24 changes: 20 additions & 4 deletions rootless-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,32 @@ fi

STATIC_RELEASE_URL=
STATIC_RELEASE_ROOTLESS_URL=

# static_release_url returns the download URL for a given package and version.
# Some releases use a different tarball name than the version number (e.g. a
# re-release with a suffix), which is handled here.
# Usage: static_release_url <docker|docker-rootless-extras> <version>
static_release_url() {
case "$2" in
29.4.2)
echo "https://download.docker.com/linux/static/$CHANNEL/$(uname -m)/$1-29.4.2-2.tgz"
;;
*)
echo "https://download.docker.com/linux/static/$CHANNEL/$(uname -m)/$1-$2.tgz"
;;
esac
}

case "$CHANNEL" in
"stable")
echo "# Installing stable version ${STABLE_LATEST}"
STATIC_RELEASE_URL="https://download.docker.com/linux/static/$CHANNEL/$(uname -m)/docker-${STABLE_LATEST}.tgz"
STATIC_RELEASE_ROOTLESS_URL="https://download.docker.com/linux/static/$CHANNEL/$(uname -m)/docker-rootless-extras-${STABLE_LATEST}.tgz"
STATIC_RELEASE_URL=$(static_release_url docker "$STABLE_LATEST")
STATIC_RELEASE_ROOTLESS_URL=$(static_release_url docker-rootless-extras "$STABLE_LATEST")
;;
"test")
echo "# Installing test version ${TEST_LATEST}"
STATIC_RELEASE_URL="https://download.docker.com/linux/static/$CHANNEL/$(uname -m)/docker-${TEST_LATEST}.tgz"
STATIC_RELEASE_ROOTLESS_URL="https://download.docker.com/linux/static/$CHANNEL/$(uname -m)/docker-rootless-extras-${TEST_LATEST}.tgz"
STATIC_RELEASE_URL=$(static_release_url docker "$TEST_LATEST")
STATIC_RELEASE_ROOTLESS_URL=$(static_release_url docker-rootless-extras "$TEST_LATEST")
;;
*)
>&2 echo "Aborting because of unknown CHANNEL \"$CHANNEL\". Set \$CHANNEL to either \"stable\" or \"test\"."
Expand Down
Loading