From 0e0a43b0c2c22d8d2e2accc1a6a8013e95c788fb Mon Sep 17 00:00:00 2001 From: cjimti Date: Tue, 16 Jun 2026 23:01:38 -0700 Subject: [PATCH] Fix multi-arch Dockerfile COPY for goreleaser dockers_v2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GoReleaser's dockers_v2 multi-platform build stages each binary under a ${TARGETPLATFORM} path in the build context (linux/amd64/rtbeat, linux/arm64/rtbeat), so `COPY rtbeat /rtbeat` finds nothing at the context root — the v1.2.1 release failed with "/rtbeat: not found". Add `ARG TARGETPLATFORM` and copy `${TARGETPLATFORM}/rtbeat`, matching the working kubefwd Dockerfile. Verified locally with buildx for both linux/amd64 and linux/arm64. --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7b7b4873..ceeae714 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,11 @@ FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b + +# GoReleaser's dockers_v2 multi-platform build stages each binary under a +# ${TARGETPLATFORM} path (e.g. linux/amd64/rtbeat) in the build context, so the +# COPY must be platform-qualified. +ARG TARGETPLATFORM RUN apk --no-cache add ca-certificates -COPY rtbeat /rtbeat +COPY ${TARGETPLATFORM}/rtbeat /rtbeat WORKDIR / EXPOSE 8081 ENTRYPOINT ["/rtbeat"]