-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes: #283 Signed-off-by: Robin Breathe <[email protected]> Signed-off-by: Brady Siegel <[email protected]>
- Loading branch information
Showing
4 changed files
with
9 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Build the manager binary | ||
FROM golang:1.22 as builder | ||
FROM --platform=${BUILDPLATFORM} golang:1.22 as builder | ||
WORKDIR /workspace | ||
|
||
ARG TARGETARCH=amd64 | ||
ARG TARGETOS=linux | ||
ARG TARGETARCH | ||
ARG TARGETOS | ||
|
||
ENV GOPROXY=direct | ||
# Copy the Go Modules manifests | ||
|
@@ -18,8 +18,8 @@ COPY main.go main.go | |
COPY pkg/ pkg/ | ||
|
||
ENV CGO_ENABLED=0 | ||
ENV GOOS=$TARGETOS | ||
ENV GOARCH=$TARGETARCH | ||
ENV GOOS=${TARGETOS:-linux} | ||
ENV GOARCH=${TARGETARCH:-amd64} | ||
ENV GO111MODULE=on | ||
|
||
# Do an initial compilation before setting the version so that there is less to | ||
|
@@ -38,7 +38,7 @@ RUN VERSION=$pkg_version && \ | |
|
||
# Use distroless as minimal base image to package the manager binary | ||
# Refer to https://github.com/GoogleContainerTools/distroless for more details | ||
FROM gcr.io/distroless/static:nonroot | ||
FROM --platform=${TARGETPLATFORM:-linux/amd64} gcr.io/distroless/static:nonroot | ||
LABEL org.opencontainers.image.authors="Jochen Ullrich <[email protected]>" | ||
LABEL org.opencontainers.image.source=https://github.com/cert-manager/aws-privateca-issuer | ||
WORKDIR / | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters