Skip to content

Commit

Permalink
Add arm64 to docker image build (#393)
Browse files Browse the repository at this point in the history
Co-authored-by: Leland Garofalo <leland@cloudflare.com>
  • Loading branch information
lgarofalo and Leland Garofalo authored Sep 7, 2023
1 parent 06d8769 commit 465baab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64,linux/s390x
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
18 changes: 16 additions & 2 deletions Dockerfile
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"]



0 comments on commit 465baab

Please sign in to comment.