Improve layer cacheability
All checks were successful
Build and Publish Docker Image / build_and_push (push) Successful in 25s
All checks were successful
Build and Publish Docker Image / build_and_push (push) Successful in 25s
This commit is contained in:
@@ -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"]
|
||||||
Reference in New Issue
Block a user