diff --git a/Dockerfile.fast b/Dockerfile.fast index 5947b75..02fbaac 100644 --- a/Dockerfile.fast +++ b/Dockerfile.fast @@ -2,6 +2,9 @@ FROM node:20-alpine AS frontend-builder WORKDIR /app/frontend +# Install build dependencies for native modules +RUN apk add --no-cache python3 make g++ + # Set npm config for better performance RUN npm config set registry https://registry.npmjs.org/ RUN npm config set fetch-timeout 300000 @@ -11,8 +14,8 @@ RUN npm config set fetch-retry-maxtimeout 120000 # Copy package files first for better caching COPY frontend/package*.json ./ -# Install dependencies with specific flags for speed -RUN npm ci --no-audit --no-fund --prefer-offline +# Install dependencies with specific flags for speed and force rebuild +RUN npm ci --no-audit --no-fund --prefer-offline --build-from-source # Copy source code COPY frontend/ .