mirror of
https://github.com/ashim-hq/ashim
synced 2026-04-21 13:37:52 +00:00
fix(docker): run frontend builder on BUILDPLATFORM to fix esbuild crash under QEMU
esbuild (used by Vite) crashes under QEMU amd64 emulation on Apple Silicon, the same way the Go runtime did. Building the frontend on the native platform is safe because the output (HTML/CSS/JS) contains no architecture-specific code.
This commit is contained in:
parent
7b4b2569f2
commit
6a3ad0d496
1 changed files with 4 additions and 1 deletions
|
|
@ -7,7 +7,10 @@
|
|||
# ============================================
|
||||
# Stage 1: Build the frontend (Vite + React)
|
||||
# ============================================
|
||||
FROM node:22-bookworm AS builder
|
||||
# Run on the native build platform to avoid QEMU crashes with esbuild on
|
||||
# Apple Silicon. The output (HTML/CSS/JS) is architecture-agnostic so it
|
||||
# is safe to build on arm64 and copy into the amd64 production layer.
|
||||
FROM --platform=$BUILDPLATFORM node:22-bookworm AS builder
|
||||
|
||||
RUN corepack enable && corepack prepare pnpm@9.15.4 --activate
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue