Prechádzať zdrojové kódy

Docker: build the frontend on the build host, not under emulation
- The arm64 image built its frontend under QEMU, where the vite
build ran for hours or hung; the output is plain JS/CSS, the
same on every architecture, so it is now built natively
- Only the frontend stage changes; the Python stage and final
image are still built per architecture

maziggy 2 dní pred
rodič
commit
8a13df1b67
1 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 4 2
      Dockerfile

+ 4 - 2
Dockerfile

@@ -1,5 +1,7 @@
-# Build frontend
-FROM node:22-bookworm-slim AS frontend-builder
+# Build frontend. Its output is plain JS/CSS, the same on every architecture,
+# so it is built natively on the build host: under QEMU emulation the arm64
+# vite build ran for hours or hung.
+FROM --platform=$BUILDPLATFORM node:22-bookworm-slim AS frontend-builder
 
 WORKDIR /app/frontend