refactor: use npm prune --omit=dev instead of deprecated --production flag
This commit is contained in:
parent
ed723bc429
commit
2efdf20f88
@ -17,8 +17,8 @@ COPY . .
|
||||
# Build TypeScript
|
||||
RUN npm run build
|
||||
|
||||
# Prune devDependencies after build
|
||||
RUN npm prune --production
|
||||
# Prune devDependencies after build (suppress warning)
|
||||
RUN npm prune --omit=dev
|
||||
|
||||
# Production stage
|
||||
FROM node:20-alpine
|
||||
|
||||
@ -17,8 +17,8 @@ COPY . .
|
||||
# Build Strapi
|
||||
RUN npm run build
|
||||
|
||||
# Prune devDependencies after build
|
||||
RUN npm prune --production
|
||||
# Prune devDependencies after build (suppress warning)
|
||||
RUN npm prune --omit=dev
|
||||
|
||||
# Production stage
|
||||
FROM node:20-alpine
|
||||
|
||||
Loading…
Reference in New Issue
Block a user