Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add arm64 to docker image build #393

Merged
merged 1 commit into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]



Loading