Skip to content

Commit

Permalink
Dockerfile: Fix wrong base image arch when cross-building with podman
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jschintag committed Dec 6, 2024
1 parent 65a18c8 commit 075f130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .

Expand Down

0 comments on commit 075f130

Please sign in to comment.