From 08bb0f985ab80512adaea5e79eb3b452763b1122 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sat, 29 Aug 2026 13:54:07 +0100 Subject: [PATCH] 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. --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 93a202b..92bd8e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,10 @@ # Build stage 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 RUN apk add --no-cache ca-certificates