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
|
# Build TypeScript
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Prune devDependencies after build
|
# Prune devDependencies after build (suppress warning)
|
||||||
RUN npm prune --production
|
RUN npm prune --omit=dev
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM node:20-alpine
|
FROM node:20-alpine
|
||||||
|
|||||||
@ -17,8 +17,8 @@ COPY . .
|
|||||||
# Build Strapi
|
# Build Strapi
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Prune devDependencies after build
|
# Prune devDependencies after build (suppress warning)
|
||||||
RUN npm prune --production
|
RUN npm prune --omit=dev
|
||||||
|
|
||||||
# Production stage
|
# Production stage
|
||||||
FROM node:20-alpine
|
FROM node:20-alpine
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user