fix(Dockerfile.spa): exclude node_modules from COPY to avoid BuildKit cache mount conflict

The COPY apps/web step was failing with:
  cannot copy to non-directory: .../app/apps/web/node_modules/@hookform/resolvers
because the host node_modules symlink conflicted with BuildKits overlayfs
cache mount. Adding --exclude=node_modules sidesteps the conflict (the
node_modules in the image is freshly created by the earlier bun install).

Parent: t_e1cbd87d
This commit is contained in:
Hermes
2026-08-01 04:40:05 +00:00
parent 3847ef7b2d
commit f337c63915
+2 -2
View File
@@ -13,8 +13,8 @@ COPY packages/shared/package.json packages/shared/package.json
# Install dependencies (workspace-aware)
RUN bun install --frozen-lockfile 2>/dev/null || bun install
# Copy full web app source
COPY apps/web ./apps/web
# Copy full web app source (exclude node_modules to avoid BuildKit cache mount conflict)
COPY --exclude=node_modules apps/web ./apps/web
# Build the SPA
RUN cd apps/web && bun run build