Skip to content

fix: build the frontend on the native arch in multi-arch builds - #76

Merged
EdmondDantes21 merged 1 commit into
mainfrom
fix/multiarch-build
Sep 18, 2026
Merged

EdmondDantes21 merged 1 commit into
mainfrom
fix/multiarch-build

Conversation

@EdmondDantes21

Copy link
Copy Markdown
Contributor

The 1.0.28 tag build hung, then died emulating npm install for linux/arm64:

#21 [linux/arm64 react-build 4/7] RUN npm install
#21 69.12 qemu: uncaught target signal 4 (Illegal instruction) - core dumped

react-build produces dist/ — static HTML/JS/CSS with nothing architecture-specific in it — so there is no reason to run Node under QEMU at all. Pinning that stage to $BUILDPLATFORM builds it once on the runner's native architecture; only the final bitnami/nginx stage stays per-platform, and it does nothing but COPY, which never executes target-arch binaries.

This removes emulation from the build entirely and makes it roughly twice as fast.

Verified locally: docker buildx build --platform linux/amd64,linux/arm64 now resolves a single native react-build stage and assembles both images from it.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@EdmondDantes21
EdmondDantes21 merged commit b17d1a2 into main Sep 18, 2026
2 of 3 checks passed
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