File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424 with :
2525 persist-credentials : false
2626
27+ - name : Set up QEMU
28+ uses : docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
29+ with :
30+ platforms : linux/amd64,linux/arm64
31+
32+ - name : Set up Docker Buildx
33+ uses : docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
34+
2735 - name : Log in to the Container registry
2836 uses : docker/login-action@dbcb813823bdd20940b903addbd779551569679f
2937 with :
4149 uses : docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a
4250 with :
4351 context : .
52+ platforms : linux/amd64,linux/arm64
4453 push : true
4554 tags : ${{ steps.meta.outputs.tags }}
4655 labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1- FROM golang:1.26.5-alpine AS builder
1+ FROM --platform=$BUILDPLATFORM golang:1.26.5-alpine AS builder
22
33WORKDIR /src
44
@@ -12,8 +12,9 @@ RUN go mod download
1212# Copy source code
1313COPY . .
1414
15- # Build the binary
16- RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /proxy ./cmd/proxy
15+ # Build the binary for the target platform
16+ ARG TARGETARCH
17+ RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o /proxy ./cmd/proxy
1718
1819FROM alpine:3.24.1
1920
You can’t perform that action at this time.
0 commit comments