Improve layer cacheability
All checks were successful
Build and Publish Docker Image / build_and_push (push) Successful in 25s

This commit is contained in:
2024-09-16 14:54:16 +00:00
parent f66f853ab4
commit e26d98f8c7

View File

@@ -27,12 +27,13 @@ RUN npm run build
################################################ ################################################
FROM node:lts-alpine FROM node:lts-alpine
COPY --from=build /app/package*.json ./
COPY --from=build /app/dist ./dist
# Install dependencies but skip dev dependencies # Install dependencies but skip dev dependencies
COPY --from=build /app/package*.json ./
RUN npm install --only=production RUN npm install --only=production
# Copy the app
COPY --from=build /app/dist ./dist
# Start the app # Start the app
ENTRYPOINT ["npm", "run"] ENTRYPOINT ["npm", "run"]
CMD ["start"] CMD ["start"]