-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add arm64 to docker image build (#393)
Co-authored-by: Leland Garofalo <leland@cloudflare.com>
- Loading branch information
Showing
2 changed files
with
17 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,23 @@ | ||
FROM golang:1.21 as builder | ||
|
||
ARG TARGETPLATFORM | ||
ARG BUILDPLATFORM | ||
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM" | ||
|
||
LABEL org.opencontainers.image.source = https://github.com/cloudflare/gokeyless | ||
LABEL org.opencontainers.image.description = "Cloudflare's Gokeyless" | ||
|
||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
WORKDIR /gokeyless | ||
COPY . . | ||
RUN env GOOS=linux GOARCH=amd64 make gokeyless | ||
RUN env GOOS=${TARGETOS} GOARCH=${TARGETARCH} make gokeyless | ||
|
||
FROM golang:1.21 | ||
WORKDIR /gokeyless | ||
COPY --from=builder /gokeyless/gokeyless gokeyless | ||
ENTRYPOINT ["./gokeyless"] | ||
ENTRYPOINT ["./gokeyless"] | ||
|
||
|
||
|