Skip to content

Commit e99dfc0

Browse files
committed
cd: fix packaging for CentOS7
Fix the problem with sudoers for CentOS7. For more details see: packpack/packpack#145
1 parent da78c01 commit e99dfc0

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

.github/workflows/packaging.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ on:
1111

1212
jobs:
1313
package:
14-
runs-on: ubuntu-latest
14+
# We use a particular version of the distribution because we want to install
15+
# a particular version of Docker.
16+
runs-on: ubuntu-22.04
1517

1618
strategy:
1719
fail-fast: false
@@ -64,6 +66,28 @@ jobs:
6466
# that all tags will exist always.
6567
run: git fetch --tags -f
6668

69+
# We use a specific version of Docker because otherwise we have a problem
70+
# with sudoers on CentOS7.
71+
# See more details: https://github.com/packpack/packpack/issues/145
72+
- name: Reinstall Docker
73+
if: |
74+
matrix.platform.os == 'el' &&
75+
matrix.platform.dist == '7'
76+
run: |
77+
sudo apt-get -y purge moby-containerd* moby-engine* moby-runc*
78+
sudo mkdir -p /etc/apt/keyrings
79+
curl -fsSL ${DOCKER_URL}/gpg | sudo gpg --dearmor -o ${GPG_KEY}
80+
echo "deb [arch=$(dpkg --print-architecture) signed-by=${GPG_KEY}] \
81+
${DOCKER_URL} $(lsb_release -cs) stable" | \
82+
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
83+
sudo apt-get update
84+
sudo apt-get -y install docker-ce=${DOCKER_VERSION} \
85+
docker-ce-cli=${DOCKER_VERSION}
86+
env:
87+
DOCKER_URL: https://download.docker.com/linux/ubuntu
88+
DOCKER_VERSION: 5:20.10.17~3-0~ubuntu-jammy
89+
GPG_KEY: /etc/apt/keyrings/docker.gpg
90+
6791
- name: Create packages
6892
run: ./packpack/packpack
6993

0 commit comments

Comments
 (0)