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:
parent
bb854e252f
commit
502c96ab45
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue