Repository navigation
fix(docker): use TARGETPLATFORM for base image - #10584
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe Dockerfile now selects the target platform for the ChangesDocker image platform
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~5 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The release images use Debian bases matching their requested architectures, and the release workflows support the Dockerfile’s target-architecture build steps. No actionable merge-blocking risk is evident. 🚥 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 |
Closes #10581
Why
Goreleaser's buildx docker builds set
--platformper architecture(see
.goreleaser.yml), but the Dockerfile pinnedFROMtoBUILDPLATFORM(the build host's architecture). The debian baselayer therefore always matched the CI runner instead of the
requested target, so multi-arch images (e.g. the arm64 tag built on
an amd64 runner) shipped a base OS of the wrong architecture while
only the copied
updateclibinary matched the intended target.Testing
Built the Dockerfile locally with buildx targeting a platform other
than the build host's, both before and after the change:
With this change,
dpkg --print-architectureinside the built imagematches the
--platformvalue passed to buildx, confirming the baseimage now tracks the requested target platform instead of the build
host.
Summary by CodeRabbit