fix(piraeus-server): Use TARGETARCH for losetup-container download#239
fix(piraeus-server): Use TARGETARCH for losetup-container download#239lexfrei wants to merge 1 commit intopiraeusdatastore:masterfrom
Conversation
Replace $(uname -m) with TARGETARCH for downloading losetup-container binary. The previous approach used the build host architecture instead of the target architecture, which breaks cross-compilation builds (e.g., building arm64 images on amd64 hosts). The fix maps TARGETARCH values (amd64, arm64) to the corresponding uname -m format (x86_64, aarch64) expected by losetup-container releases. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
Wrong. The command gets executed in a @lexfrei Is there actually an issue or did you just put your AI to work fixing issues it "found", that are not actually there? |
|
You're right that That said, the code change itself is still worthwhile for consistency: I've updated the PR description to reflect the actual motivation. |
Summary
Use
TARGETARCHinstead of$(uname -m)for downloading losetup-container binary, consistent with howk8s-await-electionandkubectlare already downloaded in the same Dockerfile.Motivation
The Dockerfile already uses
${TARGETARCH}for two other downloads:k8s-await-election-...-linux-${TARGETARCH}.tar.gz.../bin/linux/${TARGETARCH}/kubectlOnly
losetup-containeruses$(uname -m). This change aligns all architecture-dependent downloads to use the same explicit mechanism.Changes