refactor: use npm prune --omit=dev instead of deprecated --production flag
This commit is contained in:
1 parent
ed723bc429
commit
2efdf20f88
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -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
|
||||||
|
|||||||
+2
-2
@@ -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
|
||||||
|
|||||||
Reference in new issue
Block a user