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:
+2
-2
@@ -13,8 +13,8 @@ COPY packages/shared/package.json packages/shared/package.json
|
|||||||
# Install dependencies (workspace-aware)
|
# Install dependencies (workspace-aware)
|
||||||
RUN bun install --frozen-lockfile 2>/dev/null || bun install
|
RUN bun install --frozen-lockfile 2>/dev/null || bun install
|
||||||
|
|
||||||
# Copy full web app source
|
# Copy full web app source (exclude node_modules to avoid BuildKit cache mount conflict)
|
||||||
COPY apps/web ./apps/web
|
COPY --exclude=node_modules apps/web ./apps/web
|
||||||
|
|
||||||
# Build the SPA
|
# Build the SPA
|
||||||
RUN cd apps/web && bun run build
|
RUN cd apps/web && bun run build
|
||||||
|
|||||||
Reference in New Issue
Block a user