Fix multi-arch Dockerfile COPY (v1.2.1 release failure)#19
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What broke
The
v1.2.1release failed at GoReleaser'sdockers_v2step:GoReleaser stages each binary under a
${TARGETPLATFORM}path in the multi-platform build context, but the Dockerfile didCOPY rtbeat /rtbeat— nothing exists at the context root, so the build failed with"/rtbeat": not found.Fix
Add
ARG TARGETPLATFORMand copy${TARGETPLATFORM}/rtbeat, matching the working kubefwd Dockerfile pattern. One file, one line of substance.Verification (locally, before asking for a re-tag)
COPY rtbeat /rtbeatfails with"/rtbeat": not found; the fixed Dockerfile builds for bothlinux/amd64andlinux/arm64viadocker buildx.release --snapshot): binaries, archives, Homebrew formula, and the multi-arch docker images all build successfully (release succeeded).Not verifiable locally (CI-only, secrets required): the GHCR push, image cosign-signing, Homebrew-tap push, and SLSA provenance. GHCR login +
packages: writealready succeeded in the failed run, so these are the only residual unknowns.After merge
The
v1.2.1tag points at the pre-fix commit (and the failed run left no release object or pushed image). Delete the stalev1.2.1tag, then re-tagv1.2.1on the fixedmaster.