Skip to content

The image is published for linux/amd64 and linux/arm64 - #48

Merged
gedaiu merged 1 commit into
mainfrom
multi-arch-image
Oct 14, 2026
Merged

gedaiu merged 1 commit into
mainfrom
multi-arch-image

Conversation

@gedaiu

@gedaiu gedaiu commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

The floor image was amd64 only, because no workflow named a platform. It is now one index per tag of linux/amd64 and linux/arm64, resolved per node at pull time.

Nothing is emulated. The compile is tsc and every package in the lockfile with a cpu or os field is a dev dependency, so the runtime node_modules is the same on both architectures. The Dockerfile pins the manifests, build and prod-deps stages to $BUILDPLATFORM and only the runtime stage, which just copies, is per target. The build takes the same time as before and needs no second runner, unlike the subsystem's native-runner matrix, which exists there because a D compile under QEMU is painfully slow.

CI's docker job now runs once per platform and runs scripts/check-image.sh against the arm64 image under QEMU. A new scripts/check-lockfile-portable.mjs fails CI if a runtime dependency ever grows a native binding, since the cross-build would then ship an x64 binary into the arm64 image. The chart needs no change; its README says what is published.

Verified locally: the arm64 image builds, reports arm64, passes the image check, and the two-platform build's log shows every install and compile stage on linux/amd64 with only the runtime stage on linux/arm64.

🤖 Generated with Claude Code

Nothing in the tree is arch-specific: the compile is tsc and no runtime dependency carries a
native binding. So the install and build stages run on the builder's own platform and only the
runtime stage, which copies, is per target; the push is one index per tag, with nothing emulated.
CI builds and checks the image for each platform, and refuses a lockfile whose runtime
dependencies are bound to a platform, since the cross-build would ship the wrong binary.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@lore-agent

lore-agent Bot commented Oct 13, 2026

Copy link
Copy Markdown

Lore is reviewing this PR — a894228e-5565-4f7f-a01a-cde61ab48e14.

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

@lore-agent lore-agent Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lore review — Approved

Correct multi-arch implementation; two minor nits on action pinning consistency and redundant CI step.

Must fix (0) · Consider (0) · Nits (2)

Reviewed by claude-sonnet-4-6

Submit a review that requests changes to have Lore push a fix for it. Comment @lore review to re-run the review.

Posted by floor, visit 8b34ae85-2f35-40b0-83b0-31e547a36ed4.

Comment thread .github/workflows/ci.yml
- uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0
- uses: docker/setup-buildx-action@v3
- name: Build the image
uses: docker/build-push-action@v7

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Pin docker/build-push-action to a SHA to match setup-qemu-action on the same job

Suggested change
uses: docker/build-push-action@v7
uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0

Comment thread .github/workflows/ci.yml
# The Dockerfile builds node_modules on the builder's platform and ships it to every
# target, which is only right while no runtime dependency carries a native binding.
- name: No runtime dependency is platform-specific
run: node scripts/check-lockfile-portable.mjs

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: check-lockfile-portable.mjs runs once per matrix job but is platform-independent; move it to a separate job both matrix jobs depend on, or at minimum note the duplication

Suggested change
run: node scripts/check-lockfile-portable.mjs
# in the matrix job, remove this step and add:
# needs: [lockfile-check]
# Then add a separate job:
# lockfile-check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v5
# - name: No runtime dependency is platform-specific
# run: node scripts/check-lockfile-portable.mjs

@gedaiu
gedaiu merged commit 8ce6f60 into main Oct 14, 2026
16 checks passed
@gedaiu
gedaiu deleted the multi-arch-image branch October 14, 2026 13:57
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.

1 participant