fix: merge npm install + build into single Docker layer (#9)

The previous fix (--include=dev) was necessary but insufficient. The
real issue is that node_modules created by npm ci in one layer can be
lost when COPY web/ . creates the next layer — depending on the Docker
storage driver (fuse-overlayfs, vfs). Merging install and build into a
single RUN eliminates the layer boundary entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shankar0123
2026-04-16 10:52:50 -04:00
parent 86fb140414
commit cc6eec3608
+1 -4
View File
@@ -5,11 +5,8 @@ FROM node:20-alpine AS frontend
WORKDIR /app/web
COPY web/package.json web/package-lock.json ./
RUN npm ci --include=dev
COPY web/ .
RUN npm run build
RUN npm ci --include=dev && npm run build
# Stage 2: Build Go binary
FROM golang:1.25-alpine AS builder