From fa1a3a37c4b535252f5255456830f4801d01de37 Mon Sep 17 00:00:00 2001 From: CrazyMax <1951866+crazy-max@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:50:25 +0100 Subject: [PATCH] test: pin images to manifest digest Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com> --- .github/workflows/ci.yml | 8 ++++---- README.md | 8 ++++---- hack/install-and-test | 14 +++++++------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 93a2850c..56866d99 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,10 +116,10 @@ jobs: run: | docker run --rm --privileged tonistiigi/binfmt:test --uninstall qemu-* docker run --rm --privileged tonistiigi/binfmt:test --install all - docker run --rm arm64v8/alpine uname -a - docker run --rm arm32v7/alpine uname -a - docker run --rm ppc64le/alpine uname -a - docker run --rm s390x/alpine uname -a + docker run --rm arm64v8/alpine:latest@sha256:ea3c5a9671f7b3f7eb47eab06f73bc6591df978b0d5955689a9e6f943aa368c0 uname -a + docker run --rm arm32v7/alpine:latest@sha256:4fdafe217d0922f3c3e2b4f64cf043f8403a4636685cd9c51fea2cbd1f419740 uname -a + docker run --rm ppc64le/alpine:latest@sha256:0880443bffa028dfbbc4094a32dd6b7ac25684e4c0a3d50da9e0acae355c5eaf uname -a + docker run --rm s390x/alpine:latest@sha256:b815fadf80495594eb6296a6af0bc647ae5f193e0044e07acec7e5b378c9ce2d uname -a docker run --rm tonistiigi/debian:riscv uname -a docker run --rm yangzewei2023/debian:loongarch64 uname -a docker run --rm --platform=linux/s390x s390x/ubuntu apt update diff --git a/README.md b/README.md index 602d9ac8..2322ba46 100644 --- a/README.md +++ b/README.md @@ -111,10 +111,10 @@ binfmt/9a44d27 qemu/v6.0.0 go/1.15.11 ## Test current emulation support ``` -docker run --rm arm64v8/alpine uname -a -docker run --rm arm32v7/alpine uname -a -docker run --rm ppc64le/alpine uname -a -docker run --rm s390x/alpine uname -a +docker run --rm arm64v8/alpine:latest@sha256:ea3c5a9671f7b3f7eb47eab06f73bc6591df978b0d5955689a9e6f943aa368c0 uname -a +docker run --rm arm32v7/alpine:latest@sha256:4fdafe217d0922f3c3e2b4f64cf043f8403a4636685cd9c51fea2cbd1f419740 uname -a +docker run --rm ppc64le/alpine:latest@sha256:0880443bffa028dfbbc4094a32dd6b7ac25684e4c0a3d50da9e0acae355c5eaf uname -a +docker run --rm s390x/alpine:latest@sha256:b815fadf80495594eb6296a6af0bc647ae5f193e0044e07acec7e5b378c9ce2d uname -a docker run --rm tonistiigi/debian:riscv uname -a ``` diff --git a/hack/install-and-test b/hack/install-and-test index e42d2b28..346953a8 100755 --- a/hack/install-and-test +++ b/hack/install-and-test @@ -20,11 +20,11 @@ echo $status | jq .supported | grep linux/386 echo $status | jq .emulators | grep qemu-riscv64 echo $status | jq .emulators | grep qemu-arm -docker run --rm arm64v8/alpine uname -a -docker run --rm arm32v7/alpine uname -a -docker run --rm ppc64le/alpine uname -a -docker run --rm s390x/alpine uname -a -docker run --rm i386/alpine uname -a +docker run --rm arm64v8/alpine:latest@sha256:ea3c5a9671f7b3f7eb47eab06f73bc6591df978b0d5955689a9e6f943aa368c0 uname -a +docker run --rm arm32v7/alpine:latest@sha256:4fdafe217d0922f3c3e2b4f64cf043f8403a4636685cd9c51fea2cbd1f419740 uname -a +docker run --rm ppc64le/alpine:latest@sha256:0880443bffa028dfbbc4094a32dd6b7ac25684e4c0a3d50da9e0acae355c5eaf uname -a +docker run --rm s390x/alpine:latest@sha256:b815fadf80495594eb6296a6af0bc647ae5f193e0044e07acec7e5b378c9ce2d uname -a +docker run --rm i386/alpine:latest@sha256:dea9f02e103e837849f984d5679305c758aba7fea1b95b7766218597f61a05ab uname -a docker run --rm tonistiigi/debian:riscv uname -a if [ "$(uname -m)" != "x86_64" ]; then exit 0; fi @@ -41,9 +41,9 @@ echo $status | jq .emulators | grep qemu-ppc64le if echo $status | jq .emulators | grep aarch64; then exit 1; fi if echo $status | jq .emulators | grep riscv64; then exit 1; fi -if docker run --rm arm64v8/alpine uname -a 2>/dev/null; then exit 1; fi +if docker run --rm arm64v8/alpine:latest@sha256:ea3c5a9671f7b3f7eb47eab06f73bc6591df978b0d5955689a9e6f943aa368c0 uname -a 2>/dev/null; then exit 1; fi docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --install arm64 -docker run --rm arm64v8/alpine uname -a +docker run --rm arm64v8/alpine:latest@sha256:ea3c5a9671f7b3f7eb47eab06f73bc6591df978b0d5955689a9e6f943aa368c0 uname -a docker run --rm --privileged tonistiigi/binfmt:${TAG:-test} --install riscv64