From 075f1301115de5dbe26d717d1107d769417a9e75 Mon Sep 17 00:00:00 2001 From: Jan Schintag Date: Fri, 6 Dec 2024 09:28:52 +0100 Subject: [PATCH] Dockerfile: Fix wrong base image arch when cross-building with podman When cross-building the image for s390x on amd64, podman would use an amd64 image for the base of the final image. Signed-off-by: Jan Schintag --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 93b04bf..ba2c735 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ ARG TARGETARCH # Build RUN CGO_ENABLED=0 GOOS=linux GOARCH="${TARGETARCH}" go build -a -o manager main.go -FROM registry.access.redhat.com/ubi8/ubi-minimal +FROM --platform=linux/$TARGETARCH registry.access.redhat.com/ubi8/ubi-minimal WORKDIR / COPY --from=builder /workspace/manager .