Fix(ci): Rebuild npm tree in Docker to fix cross-platform issue
Publish Docker image / build-and-push (push) Successful in 4m47s
Publish Docker image / build-and-push (push) Successful in 4m47s
This commit is contained in:
+4
-3
@@ -2,9 +2,10 @@
|
||||
FROM node:18-slim AS frontend-builder
|
||||
WORKDIR /app/frontend
|
||||
|
||||
# Copy package config and install dependencies
|
||||
COPY frontend/package.json frontend/package-lock.json* ./
|
||||
RUN npm ci
|
||||
# Copy package.json ONLY and install dependencies from scratch
|
||||
# This avoids issues with lock files generated on different OS (e.g. Windows -> Linux)
|
||||
COPY frontend/package.json ./
|
||||
RUN npm install
|
||||
|
||||
# Copy rest of the frontend code and build
|
||||
COPY frontend/ .
|
||||
|
||||
Reference in New Issue
Block a user