Files
Elliot Morales Solé a55d4c6c0f build: pin the builder stage to the host platform
The build already cross-compiles explicitly (CGO_ENABLED=0, GOOS=linux,
GOARCH=$TARGETARCH), so the toolchain never needs to match the target arch.
Without --platform=$BUILDPLATFORM a cross-arch build runs the entire Go
compilation under QEMU emulation for a byte-identical binary: building
linux/amd64 on an arm64 host went from minutes to still-running after ten.

Only the final stage stays on $TARGETPLATFORM, where it belongs.

go-version.sh reads the Go version out of the builder's FROM line, so its
pattern now accepts an optional --platform flag before the image.
2026-10-27 15:18:28 +01:00
..