Repository navigation
fix(docker): build the arm64 image with an arm64 userland - #2932
Erik Osterman (Cloud Posse) (osterman) merged 5 commits into
Conversation
The runtime FROM was pinned to $BUILDPLATFORM, so for every target the Debian base and all apt-installed tools resolved to the build host arch (amd64). The published linux/arm64 image shipped an amd64 userland and failed with `exec format error` on arm64 hardware. Drop the override so the base follows TARGETPLATFORM, and assert the base arch matches the target so this cannot silently regress.
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
Important Cloud Posse Engineering Team Review RequiredThis pull request modifies files that require Cloud Posse's review. Please be patient, and a core maintainer will review your changes. To expedite this process, reach out to us on Slack in the |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan includes up to 4 reviews per rolling hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe Dockerfile now follows the requested target platform for the Debian base image. It declares ChangesDocker Platform Alignment
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The PR makes the arm64 image use an arm64 userland and adds a build-time guard against regression. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
CodeRabbit (@coderabbitai) is this the correct fix? my concern is we're removing |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
dockerfile=$(fd -t f -a '^Dockerfile$|\.Dockerfile$' . | head -n 1)
if [ -z "${dockerfile:-}" ]; then
echo "No Dockerfile found"
exit 0
fi
echo "== Dockerfile: $dockerfile =="
ast-grep outline "$dockerfile" --items all --view expanded || true
echo "== PR diff =="
git diff --find-renames origin/HEAD...HEAD -- "$dockerfile" || \
git diff --find-renames HEAD^...HEAD -- "$dockerfile"
echo "== Full Dockerfile (numbered) =="
cat -n "$dockerfile"Length of output: 5429
The Dockerfile then downloads some binaries for This stage is the published runtime stage. It must use the target platform: FROM debian:trixie-slimWith Buildx, an unpinned
The only operational requirement is standard Buildx emulation when an amd64 builder executes 🧠 Learnings usedYou are interacting with an AI system. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2932 +/- ##
==========================================
- Coverage 83.29% 83.29% -0.01%
==========================================
Files 1898 1898
Lines 185057 185057
==========================================
- Hits 154148 154134 -14
- Misses 23064 23072 +8
- Partials 7845 7851 +6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Erik Osterman (Cloud Posse) (@osterman) there's also some test opportunities here, see #2936 (would benefit by being run a few times, this was my blind fix) |
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
Tip Atmos Pro
No affected stacks workflow was detected for this pull request. |
|
These changes were released in v1.226.0-test.9. |
…into 1199-pro-exec-metadata * '1199-pro-exec-metadata' of github.com:cloudposse/atmos: chore: upgrade actions to Node 24 runtime (SHA-pinned) (#2934) fix(docker): build the arm64 image with an arm64 userland (#2932) feat(profiles): interactive multi-select for bare --profile (#2951) fix(git): tolerate config errors for CI git-clone bootstrap pre-Cobra (#2879) feat(vendor): add --stack/--labels flags, fix --tags selector bugs (#1889) feat(scaffold): dynamic per-combination file generation via matrix (#2928) feat(auth): add GKE kubeconfig integration (#2937)
This makes the
linux/arm64image you already publish run on arm64 hardware,instead of failing at startup with
exec format error. The arm64 image hasshipped an amd64 userland since it was first added, so this closes the gap between
the advertised multi-arch manifest and what arm64 users actually receive. The
change is one line and additive, plus a guard so it cannot silently regress.
what
--platform=$BUILDPLATFORMpin on the runtimeFROMso the Debianbase and all apt-installed tools follow
TARGETPLATFORM.target, so a re-introduced pin fails the build instead of shipping a
wrong-arch image.
why
linux/arm64image contained an amd64 userland and failed withexec format erroron arm64 hardware. Onlyatmosandkustomizewerearm64, and they were stranded in an amd64 rootfs with no aarch64 loader.
tag has a working arm64 image. The guard would have caught this on day one.
references
linux/arm64Docker image contains an amd64 userland (every base binary failsexec format erroron arm64 hardware) #2931