Skip to content

Commit e2d3ec7

Browse files
committed
fix: copy node_modules from builder to fix better-sqlite3
Revert to copying node_modules from builder stage where native modules are already compiled. This is simpler and more reliable than trying to rebuild in the runtime stage.
1 parent 969ddf5 commit e2d3ec7

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

Dockerfile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,13 @@ FROM node:22-alpine
2626

2727
ARG VERSION=unknown
2828

29-
RUN apk add --no-cache dumb-init curl docker-cli python3 make g++
29+
RUN apk add --no-cache dumb-init curl docker-cli
3030

3131
ENV VERSION=${VERSION}
3232

3333
WORKDIR /app
3434

35-
COPY package.json pnpm-lock.yaml ./
36-
RUN corepack enable && corepack prepare pnpm@latest --activate && \
37-
pnpm install --frozen-lockfile --prod --ignore-scripts && \
38-
pnpm rebuild better-sqlite3 && \
39-
rm -rf /root/.cache
40-
35+
COPY --from=builder /app/node_modules ./node_modules
4136
COPY --from=builder /app/dist ./dist
4237
COPY --from=builder /app/drizzle ./drizzle
4338
COPY --from=builder /app/templates ./templates

0 commit comments

Comments
 (0)