Skip to content

feat(build): forward --builder to container build (refs #10)#15

Merged
us merged 1 commit into
mainfrom
feat/issue-10-wire-builder-flag
Jun 11, 2026
Merged

feat(build): forward --builder to container build (refs #10)#15
us merged 1 commit into
mainfrom
feat/issue-10-wire-builder-flag

Conversation

@us

@us us commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Wires the previously-stubbed --builder flag through to container build, and
documents the remote-builder workaround for exotic architectures. Two of the four
acceptance criteria on #10 that are achievable without waiting on upstream.

⚠️ This does not close #10. The core problem — the local arm64 BuildKit VM
has no QEMU binfmt handlers for ppc64le/s390x/riscv64 RUN steps — is
upstream-blocked on apple/container#1496.
#10 stays open as the tracking issue.

What changed

  • Wire --builder end-to-end. Build.run() now forwards builder: to
    ImageManager.build(), which gained a builder: String? parameter that maps
    to container build --builder. Previously the flag was accepted, shown in
    --help, and silently discarded.
  • Extract makeBuildArguments() — a pure, side-effect-free static helper
    that builds the container build argument vector. Makes argument construction
    unit-testable without spawning a process.
  • README: added a third row to the exotic-arch workarounds table covering the
    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 + remote
BuildKit 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
--builder wiring is its mechanical first step, usable today.

Testing

  • New ImageManagerBuildArgsTests (6 tests): verifies --builder is forwarded
    with 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 --help confirms --builder is surfaced.

Refs #10

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
@us us merged commit 3024963 into main Jun 11, 2026
1 check passed
@us us deleted the feat/issue-10-wire-builder-flag branch June 11, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

track: exotic-arch builds (ppc64le, s390x, riscv64) — Apple QEMU support or mocker workaround

1 participant