Skip to content

Commit 32510bf

Browse files
committed
fix: docker
1 parent 5da8704 commit 32510bf

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

packages/web/Dockerfile

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,21 @@ COPY . .
1515

1616
RUN npm install && node scripts/sync-version.cjs && npm run build:web
1717

18-
FROM gcr.io/distroless/nodejs25-debian12 AS runner
18+
FROM node:25-alpine AS runner
1919
WORKDIR /app
2020

2121
ENV NODE_ENV=production
2222
ENV PORT=3000
2323
ENV HOSTNAME="0.0.0.0"
2424

25-
COPY --from=builder /app/packages/web/.next/standalone ./
26-
COPY --from=builder /app/packages/web/.next/static ./packages/web/.next/static
27-
COPY --from=builder /app/packages/web/public ./packages/web/public
25+
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 nextjs
26+
27+
COPY --from=builder --chown=nextjs:nodejs /app/packages/web/.next/standalone ./
28+
COPY --from=builder --chown=nextjs:nodejs /app/packages/web/.next/static ./packages/web/.next/static
29+
COPY --from=builder --chown=nextjs:nodejs /app/packages/web/public ./packages/web/public
30+
31+
USER nextjs
2832

2933
EXPOSE 3000
3034

31-
CMD ["packages/web/server.js"]
35+
CMD ["node", "packages/web/server.js"]

0 commit comments

Comments
 (0)