Skip to content

Commit e20053c

Browse files
committed
fix: Copy complete node_modules to production image instead of reinstalling with --production flag
1 parent 4c90707 commit e20053c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Dockerfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ RUN bun run build
1717
FROM base AS runner
1818
WORKDIR /app
1919

20-
# Copy built application
20+
# Copy built application and node_modules
2121
COPY --from=builder /app/.output ./.output
2222
COPY --from=builder /app/package.json ./package.json
23-
24-
# Install production dependencies only
25-
RUN bun install --production --frozen-lockfile
23+
COPY --from=builder /app/node_modules ./node_modules
2624

2725
# Set production environment
2826
ENV NODE_ENV=production

0 commit comments

Comments
 (0)