From c65d6b68532c022bb9bcc0d5590e1a7fff77ee45 Mon Sep 17 00:00:00 2001 From: BetterHuman Date: Tue, 5 May 2026 23:16:38 +0000 Subject: [PATCH] fix: use Debian node for build stages to fix rollup musl Alpine bug --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5ff46dc0..4be81962 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,16 @@ -# Stage 1: Build frontend -FROM node:20-alpine AS frontend-build +# Stage 1: Build frontend (use Debian-based node to avoid Alpine musl/rollup issues) +FROM node:20 AS frontend-build WORKDIR /app/frontend +ENV NODE_ENV=development COPY frontend/package*.json ./ -# Remove lock file and reinstall fresh to avoid rollup musl bug on Alpine RUN rm -f package-lock.json && npm install --legacy-peer-deps COPY frontend/ ./ RUN npm run build # Stage 2: Build backend -FROM node:20-alpine AS backend-build +FROM node:20 AS backend-build WORKDIR /app/backend +ENV NODE_ENV=development COPY backend/package*.json ./ RUN npm install COPY backend/ ./