From e9dd23eac6f888185ff82041fdd5f5ecd3c8c8aa Mon Sep 17 00:00:00 2001 From: Matt Dainty Date: Mon, 29 Jul 2024 19:36:10 +0100 Subject: [PATCH] ci: Downgrade Docker Work around incompatibility between old Podman and new Docker. --- .github/workflows/build.yml | 20 +++++++++++++++++--- testdata/Dockerfile | 6 +++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa116af..c30dc67 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,6 +40,11 @@ jobs: with: go-version: ${{ matrix.go }} + - name: Install Kerberos client + run: | + sudo apt-get update + sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq libkrb5-dev krb5-user + - name: golangci-lint (gokrb5) uses: golangci/golangci-lint-action@v5 if: github.event_name == 'pull_request' @@ -61,10 +66,19 @@ jobs: env: GOOS: windows - - name: Install Kerberos client + - name: Podman version + id: podman + shell: bash run: | - sudo apt-get update - sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq libkrb5-dev krb5-user + echo "version=$(podman version | grep '^Version:' | tr -s ' ' | cut -d ' ' -f 2)" >>"${GITHUB_OUTPUT}" + + - name: Downgrade Docker + if: steps.podman.outputs.version == '3.4.4' + shell: bash + run: | + apt-cache madison docker.io + sudo apt-get remove containerd.io + sudo apt-get install docker.io=24.0.7-0ubuntu2~22.04.1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 diff --git a/testdata/Dockerfile b/testdata/Dockerfile index efbb7fd..2ed2fe3 100644 --- a/testdata/Dockerfile +++ b/testdata/Dockerfile @@ -1,4 +1,4 @@ -FROM rockylinux/rockylinux:9-ubi-init as kdc +FROM rockylinux/rockylinux:9-ubi-init AS kdc EXPOSE 8088 EXPOSE 8464 @@ -21,7 +21,7 @@ RUN kadmin.local ktadd -norandkey -k /etc/test.keytab test RUN kadmin.local addprinc -randkey DNS/ns.example.com RUN kadmin.local ktadd -k /etc/dns.keytab DNS/ns.example.com -FROM rockylinux/rockylinux:9-ubi-init as ns +FROM rockylinux/rockylinux:9-ubi-init AS ns EXPOSE 8053 @@ -40,6 +40,6 @@ RUN chmod 640 /etc/named.conf COPY --chown=named:named db.* /var/named/dynamic/ RUN chmod 644 /var/named/dynamic/db.* -FROM scratch as keytab +FROM scratch AS keytab COPY --from=kdc /etc/test.keytab /test.keytab COPY --from=kdc /etc/dns.keytab /dns.keytab