Use recommended --omit=dev flag in runtime's npm ci

This commit is contained in:
Maciej Pędzich 2024-07-22 09:20:57 +02:00
parent 2199b3b998
commit f4295f7c57
Signed by: maciejpedzich
GPG Key ID: CE4A303D84882F0D

View File

@ -9,7 +9,7 @@ WORKDIR /app
ENV NODE_ENV production
USER node
COPY package*.json ./
RUN npm ci --production
COPY --from=build --chown=node:node /app/dist ./dist
RUN npm ci --omit=dev
COPY --from=build /app/dist ./dist
EXPOSE 3000
CMD ["node", "./dist/index.js"]