fix(docker): declare ARG TARGETARCH so buildx cross-builds work

TARGETARCH was referenced but never declared, so every platform in a
multi-arch buildx run received an amd64 binary. The arm64 image
crashed on Raspberry Pi nodes with an exec format error.
This commit is contained in:
2026-08-29 13:54:07 +01:00
parent 14b61fa962
commit 08bb0f985a
+4
View File
@@ -1,6 +1,10 @@
# Build stage # Build stage
FROM golang:1.26-alpine AS builder FROM golang:1.26-alpine AS builder
# Populated by buildx per platform; without this declaration the
# GOARCH=${TARGETARCH:-amd64} below silently builds amd64 for every platform.
ARG TARGETARCH
# Install ca-certificates for HTTPS support # Install ca-certificates for HTTPS support
RUN apk add --no-cache ca-certificates RUN apk add --no-cache ca-certificates