fix(bootstrap): set docker build platform args#1761
Merged
drew merged 1 commit intoJun 4, 2026
Conversation
Docker BuildKit exposes TARGET* for the requested image platform. It exposes BUILD* for the daemon running build stages. The bootstrap path did not pass an explicit platform or seed those args, so Dockerfile behavior could depend on daemon defaults. Set the build request platform from TARGETPLATFORM when supplied. Use the daemon platform as the fallback. Query the daemon for BUILD*. Seed implicit args without overwriting caller values. Do not inject empty variant args. Tests - mise run pre-commit Signed-off-by: Shiju <shiju@nvidia.com>
|
All contributors have signed the DCO ✍️ ✅ |
Contributor
Author
|
I have read the DCO document and I hereby sign the DCO. |
Collaborator
|
recheck |
Collaborator
|
/ok to test bfac8a5 |
drew
approved these changes
Jun 4, 2026
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.
Summary
Make Dockerfile-based sandbox image builds pass explicit Docker BuildKit platform metadata. It uses
TARGETPLATFORMfor the requested output image when supplied, falls back to the Docker daemon platform, and seeds the implicitTARGET*/BUILD*build args so Dockerfile behavior does not depend on daemon defaults.Related Issue
N/A
Changes
TARGETVARIANTorBUILDVARIANTvalues so Dockerfile defaults still work for no-variant platforms.Testing
mise run pre-commitpassescargo fmt --checkenv CARGO_TARGET_DIR=/Users/shiju/.cargo/shared-target cargo test -p openshell-bootstrapChecklist