Fix Dockerfile COPY instruction with invalid shell syntax

Removed the conditional COPY line that used 2>/dev/null || true —
shell operators are not valid in Dockerfile COPY instructions and
were being interpreted as literal paths. pnpm hoists all deps to
root node_modules via shamefully-hoist so the line was unnecessary.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 22:00:15 -05:00
parent 420321c9a9
commit 897b1c9bef

View File

@@ -54,9 +54,8 @@ RUN apk add --no-cache tini su-exec
WORKDIR /app WORKDIR /app
# No native deps — runtime only needs node_modules for pure-JS packages (express, cors, etc.) # No native deps — runtime only needs node_modules for pure-JS packages (express, cors, etc.)
# Copy them directly from the builder stage instead of re-installing # pnpm hoists everything to the root node_modules (shamefully-hoist=true in .npmrc)
COPY --from=server-builder /build/node_modules ./node_modules COPY --from=server-builder /build/node_modules ./node_modules
COPY --from=server-builder /build/apps/server/node_modules ./apps/server/node_modules 2>/dev/null || true
# Copy compiled server output (includes dist/db/migrations/*.js compiled by tsc) # Copy compiled server output (includes dist/db/migrations/*.js compiled by tsc)
COPY --from=server-builder /build/apps/server/dist ./apps/server/dist COPY --from=server-builder /build/apps/server/dist ./apps/server/dist