Fix Dockerfile: Use npm install instead of npm ci (package-lock.json missing)
This commit is contained in:
@@ -2,9 +2,9 @@ FROM node:20-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
# Install dependencies (including dev dependencies for build)
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production && npm cache clean --force
|
||||
RUN npm install && npm cache clean --force
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
@@ -19,7 +19,7 @@ WORKDIR /app
|
||||
|
||||
# Install only production dependencies
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production && npm cache clean --force
|
||||
RUN npm install --omit=dev && npm cache clean --force
|
||||
|
||||
# Copy built files
|
||||
COPY --from=builder /app/dist ./dist
|
||||
|
||||
Reference in New Issue
Block a user