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:
@@ -54,9 +54,8 @@ RUN apk add --no-cache tini su-exec
|
||||
WORKDIR /app
|
||||
|
||||
# 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/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 --from=server-builder /build/apps/server/dist ./apps/server/dist
|
||||
|
||||
Reference in New Issue
Block a user