From ccaa38d31f6ddec7b4b3497b49d1e9cee60248f7 Mon Sep 17 00:00:00 2001 From: Kun Lu Date: Thu, 6 Jan 2022 11:19:26 -0500 Subject: [PATCH] Add s390x support to docker images (#1749) * Add s390x support to docker images 1. add s390x support to docker images `executor`, `executor(slim)`, `executor(debug)` and `warmer`. Fixes #1462 and #1665. 2. Address the building issue of dependency `docker-credential-gcr` in Dockerfiles. This issue was introduced when recent commits in `docker-credential-gcr` removed the Makefile. Signed-off-by: Kun-Lu * Add s390x support to all images except debug image * Add s390x support to images.yaml * Fix ld64.so.1 not found issue on s390x * Add a comment for copying /lib from busybox container on s390x --- .github/workflows/images.yaml | 6 +++--- deploy/Dockerfile_debug | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml index 5d0ae51c2..af9c75124 100644 --- a/.github/workflows/images.yaml +++ b/.github/workflows/images.yaml @@ -33,14 +33,14 @@ jobs: include: - image: executor dockerfile: ./deploy/Dockerfile - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x image-name: gcr.io/kaniko-project/executor tag: ${{ github.sha }} release-tag: latest - image: executor-debug dockerfile: ./deploy/Dockerfile_debug - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x image-name: gcr.io/kaniko-project/executor tag: ${{ github.sha }}-debug release_tag: debug @@ -54,7 +54,7 @@ jobs: - image: warmer dockerfile: ./deploy/Dockerfile_warmer - platforms: linux/amd64,linux/arm64 + platforms: linux/amd64,linux/arm64,linux/s390x image-name: gcr.io/kaniko-project/warmer tag: ${{ github.sha }} release-tag: latest diff --git a/deploy/Dockerfile_debug b/deploy/Dockerfile_debug index 363e1c7ef..3ed7c2dc1 100644 --- a/deploy/Dockerfile_debug +++ b/deploy/Dockerfile_debug @@ -57,6 +57,11 @@ COPY --from=0 /usr/local/bin/docker-credential-gcr /kaniko/docker-credential-gcr COPY --from=0 /usr/local/bin/docker-credential-ecr-login /kaniko/docker-credential-ecr-login COPY --from=0 /usr/local/bin/docker-credential-acr-env /kaniko/docker-credential-acr-env COPY --from=busybox:1.32.0 /bin /busybox +# Since busybox needs some lib files which lie in /lib directory to run the executables on s390x, +# the below COPY command is added to address "ld64.so.1 not found" issue. This extra copy action will not +# happen on amd64 or arm64 platforms since /lib does not exist in amd64 or arm64 version of busybox container. +# Similar issues could be found in https://github.com/multiarch/qemu-user-static/issues/110#issuecomment-652951564. +COPY --from=busybox:1.32.0 /*lib /lib # Declare /busybox as a volume to get it automatically in the path to ignore VOLUME /busybox