feat(build): forward --builder to container build (refs #10)#15
Merged
Conversation
The --builder flag was declared and shown in --help but silently discarded: Build.run() never passed it and ImageManager.build() had no builder param. Wire it end-to-end and extract argument construction into a pure, testable makeBuildArguments() helper. This enables the remote-builder workaround for exotic architectures (ppc64le/s390x/riscv64) whose RUN steps the local arm64 BuildKit VM cannot emulate — apple/container#1496 remains the upstream blocker. Also document the remote-builder workaround in the README exotic-arch table. Refs #10
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
Wires the previously-stubbed
--builderflag through tocontainer build, anddocuments the remote-builder workaround for exotic architectures. Two of the four
acceptance criteria on #10 that are achievable without waiting on upstream.
What changed
--builderend-to-end.Build.run()now forwardsbuilder:toImageManager.build(), which gained abuilder: String?parameter that mapsto
container build --builder. Previously the flag was accepted, shown in--help, and silently discarded.makeBuildArguments()— a pure, side-effect-free static helperthat builds the
container buildargument vector. Makes argument constructionunit-testable without spawning a process.
remote-builder path (
mocker build --builder <name> --platform linux/ppc64le,backed by a remote BuildKit node such as
docker buildx create --driver remote ssh://host).Why this is the right scope
Per the investigation in
.context/issue-10-report.md: Options A (Podman + remoteBuildKit auto-routing) and B/C remain deferred — not locally testable and/or
multi-PR. Option D (manual remote builder) is the cleanest architecture and the
--builderwiring is its mechanical first step, usable today.Testing
ImageManagerBuildArgsTests(6 tests): verifies--builderis forwardedwith its value, omitted when nil/empty, composes with
--platform linux/ppc64le,and that the full flag matrix is well-formed.
swift build— clean.swift test— full suite green (71 tests, 9 suites).mocker build --helpconfirms--builderis surfaced.Refs #10