From 58f31c2dff486f6443f57982d4564f504f54d31e Mon Sep 17 00:00:00 2001 From: Qi Feng Huo Date: Fri, 15 Sep 2023 09:08:28 +0800 Subject: [PATCH] peerpod-ctl: add ppc64le for multi-arch images for peerpod-ctl Fixes: #1432 Signed-off-by: Qi Feng Huo --- .github/workflows/peerpod-ctrl_image.yaml | 2 +- peerpod-ctrl/Dockerfile | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/peerpod-ctrl_image.yaml b/.github/workflows/peerpod-ctrl_image.yaml index 98c906b21..889bcec39 100644 --- a/.github/workflows/peerpod-ctrl_image.yaml +++ b/.github/workflows/peerpod-ctrl_image.yaml @@ -44,7 +44,7 @@ jobs: quay.io/confidential-containers/peerpod-ctrl:${{ github.sha }} push: true context: peerpod-ctrl - platforms: linux/amd64, linux/s390x + platforms: linux/amd64, linux/s390x, linux/ppc64le build-args: | GOFLAGS=-tags=aws,azure,ibmcloud,vsphere,libvirt diff --git a/peerpod-ctrl/Dockerfile b/peerpod-ctrl/Dockerfile index 62c0cdbfd..cd35e8afb 100644 --- a/peerpod-ctrl/Dockerfile +++ b/peerpod-ctrl/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM --platform=$BUILDPLATFORM quay.io/confidential-containers/golang-fedora:1.20.8-36 as builder +FROM --platform=$TARGETPLATFORM quay.io/confidential-containers/golang-fedora:1.20.8-36 as builder ARG TARGETOS ARG TARGETARCH ARG CGO_ENABLED=1 @@ -19,7 +19,8 @@ COPY main.go main.go COPY api/ api/ COPY controllers/ controllers/ -#RUN if [ "$TARGETARCH" = s390x ] ; then ln /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc; fi +RUN if [ "$TARGETARCH" = s390x ] ; then ln /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc; fi +RUN if [ "$TARGETARCH" = ppc64le ] ; then ln /usr/bin/gcc /usr/bin/powerpc64-linux-gnu-gcc; fi # Build # the GOARCH has not a default value to allow the binary be built according to the host where the command