Fix Docker COPY conflict by copying source before node_modules

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-14 19:27:38 -07:00
parent bb854e252f
commit 502c96ab45
1 changed files with 3 additions and 1 deletions

View File

@ -14,9 +14,11 @@ RUN pnpm install --frozen-lockfile || pnpm install
# Build stage
FROM base AS builder
WORKDIR /app
# Copy source first, then overwrite node_modules with deps stage
COPY rfunds-online/ .
RUN rm -rf node_modules .next
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /encryptid-sdk /encryptid-sdk
COPY rfunds-online/ .
RUN pnpm build
# Production stage