fix: use Debian node for build stages to fix rollup musl Alpine bug
This commit is contained in:
+5
-4
@@ -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/ ./
|
||||
|
||||
Reference in New Issue
Block a user