From 8a2aff2708248ce780283fab256912f59b137417 Mon Sep 17 00:00:00 2001 From: Michael Aguiar Date: Wed, 14 Oct 2026 14:10:24 -0700 Subject: [PATCH] Cross-compile the idle image instead of emulating arm64 The build stage ran on each target platform, so the arm64 leg of release.sh's multi-platform push needed QEMU. Without it (as on the release machine) go build fails with 'exec format error'. The stage already cross-compiles via GOOS/GOARCH, so run it on BUILDPLATFORM. --- Dockerfile.idle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile.idle b/Dockerfile.idle index f3abab2..9491c38 100644 --- a/Dockerfile.idle +++ b/Dockerfile.idle @@ -1,7 +1,9 @@ # The ingot_idle global service (cmd/ingot-idle). Published as # ghcr.io/aliasproject/ingot-idle: by scripts/release.sh, tagged with # the CLI version so a CLI always runs the service it was built against. -FROM golang:1.23-alpine AS build +# Build on the host platform and cross-compile with GOOS/GOARCH, so an +# arm64 image builds without emulation (QEMU) on an amd64 machine. +FROM --platform=$BUILDPLATFORM golang:1.23-alpine AS build WORKDIR /src COPY go.mod ./ COPY cmd/ingot-idle ./cmd/ingot-idle