diff --git a/Dockerfile b/Dockerfile index e534dc4..4345143 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,10 @@ ############################ # Build Stage ############################ -FROM golang:1.26-alpine AS build +# Run the Go toolchain on the NATIVE build platform and cross-compile to the +# target via GOOS/GOARCH below — avoids emulating an amd64 toolchain on arm64 +# hosts (QEMU segfaults during module download). No-op when build==target. +FROM --platform=$BUILDPLATFORM golang:1.26-alpine AS build WORKDIR /src RUN apk add --no-cache git