Why this matters
Consistent dependency graphs improve reproducibility and reduce bloat in the final image.
Use `npm ci` for reproducible installs in build stages; in runtime, run `npm prune --omit=dev` or install with `--omit=dev`.
Consistent dependency graphs improve reproducibility and reduce bloat in the final image.
Side-by-side examples engineers can pattern-match during review.
RUN npm install # mutates lockfile and installs dev depsRUN npm ci
# later in runtime stage
RUN npm prune --omit=devRUN npm installRUN npm ci && npm prune --omit=devFrom the same buckets as this rule.