mirror of
https://github.com/johndoe6345789/low-code-react-app-b.git
synced 2026-04-24 21:54:56 +00:00
Optimize Docker layer caching while fixing workspace issue
Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -2,13 +2,18 @@ FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy all files including workspace packages to support npm workspaces
|
||||
COPY . .
|
||||
# Copy package files and workspace packages for dependency installation
|
||||
COPY package*.json ./
|
||||
COPY packages/spark/package.json ./packages/spark/package.json
|
||||
COPY packages/spark/src ./packages/spark/src
|
||||
|
||||
# Install dependencies
|
||||
# Note: npm ci doesn't work with workspace: protocol, so we use npm install
|
||||
# Note: npm ci doesn't work reliably with workspace: protocol, so we use npm install
|
||||
RUN npm install
|
||||
|
||||
# Copy remaining application files
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN npm run build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user