medium10 pts · first answer countsdockerci-cd
Slow Docker builds on every change
Every one-line code change makes the Docker build reinstall all npm packages. What change speeds it up?
FROM node:22-alpine WORKDIR /app COPY . . RUN npm ci RUN npm run build CMD ["node", "dist/server.js"]