1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- FROM node:18-alpine AS runner
- WORKDIR /app
- ENV NODE_ENV production
- RUN apk add --no-cache dos2unix
- RUN addgroup -g 1001 -S nodejs
- RUN adduser -S nextjs -u 1001
- COPY --from=builder /app/public ./public
- COPY --from=builder /app/package.json ./package.json
- COPY --from=builder /app/node_modules ./node_modules
- COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
- COPY --from=builder /app/next.config.mjs ./next.config.mjs
- RUN dos2unix /app/node_modules/.bin/next
- RUN chown -R nextjs:nodejs /app
- USER nextjs
- EXPOSE 3000
- ENV PORT 3000
- ENV NEXT_TELEMETRY_DISABLED 1
- CMD ["pnpm", "start"]
|