Skip to content

Commit

Permalink
Run arm64 builds natively.
Browse files Browse the repository at this point in the history
In principle we could just cross-build from a single runner, but it's
less hassle to just do the same thing we do for the Ruby builds where we
don't cross-compile.
  • Loading branch information
sengi committed May 14, 2024
1 parent 3d6a4c4 commit 14de677
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ARG go_version=1.22
ARG go_tag_suffix=-alpine


FROM ${go_registry}golang:${go_version}${go_tag_suffix} AS builder
FROM --platform=$TARGETPLATFORM $${go_registry}golang:${go_version}${go_tag_suffix} AS builder
ARG TARGETARCH TARGETOS
ARG GOARCH=$TARGETARCH GOOS=$TARGETOS
ARG CGO_ENABLED=0
Expand All @@ -16,7 +16,7 @@ COPY . ./
RUN go build -o /bin/govuk-exporter main.go


FROM scratch
FROM --platform=$TARGETPLATFORM $scratch
COPY --from=builder /bin/govuk-exporter /bin/govuk-exporter
COPY --from=builder /usr/share/ca-certificates /usr/share/ca-certificates
COPY --from=builder /etc/ssl /etc/ssl
Expand Down

0 comments on commit 14de677

Please sign in to comment.