diff --git a/Dockerfile b/Dockerfile index ded6532..e4b39ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,10 @@ -# Stage 1: build the React SPA -FROM node:22-slim AS frontend-build +# Stage 1: build the React SPA. +# Pin to the native build host ($BUILDPLATFORM) so the Node/V8 build never runs +# under QEMU during multi-arch builds — emulated Node crashes V8's baseline JIT +# (SIGTRAP / exit 133 on `npm ci`). The dist/ output is static JS/CSS, i.e. +# architecture-independent, so building it once and COPYing it into each +# target-arch runtime stage is both correct and avoids the emulator entirely. +FROM --platform=$BUILDPLATFORM node:22-slim AS frontend-build WORKDIR /frontend