Skip to content

Commit 465baab

Browse files
lgarofaloLeland Garofalo
and
Leland Garofalo
authored
Add arm64 to docker image build (#393)
Co-authored-by: Leland Garofalo <[email protected]>
1 parent 06d8769 commit 465baab

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
uses: docker/build-push-action@v4
6262
with:
6363
context: .
64-
platforms: linux/amd64,linux/arm64,linux/s390x
64+
platforms: linux/amd64,linux/arm64
6565
push: true
6666
tags: ${{ steps.meta.outputs.tags }}
6767
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
FROM golang:1.21 as builder
2+
3+
ARG TARGETPLATFORM
4+
ARG BUILDPLATFORM
5+
RUN echo "I am running on $BUILDPLATFORM, building for $TARGETPLATFORM"
6+
7+
LABEL org.opencontainers.image.source = https://github.com/cloudflare/gokeyless
8+
LABEL org.opencontainers.image.description = "Cloudflare's Gokeyless"
9+
10+
ARG TARGETOS
11+
ARG TARGETARCH
12+
213
WORKDIR /gokeyless
314
COPY . .
4-
RUN env GOOS=linux GOARCH=amd64 make gokeyless
15+
RUN env GOOS=${TARGETOS} GOARCH=${TARGETARCH} make gokeyless
516

617
FROM golang:1.21
718
WORKDIR /gokeyless
819
COPY --from=builder /gokeyless/gokeyless gokeyless
9-
ENTRYPOINT ["./gokeyless"]
20+
ENTRYPOINT ["./gokeyless"]
21+
22+
23+

0 commit comments

Comments
 (0)