Guest User

Dockerfile

a guest
Feb 2nd, 2024
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. FROM node:18-alpine as runner
  2.  
  3. WORKDIR /app
  4.  
  5. RUN addgroup --system --gid 1001 nodejs
  6. RUN adduser --system --uid 1001 nextjs
  7. USER nextjs
  8.  
  9. COPY ./next.config.js .
  10. COPY ./package.json .
  11.  
  12. ENV NEXT_TELEMETRY_DISABLED 1
  13.  
  14. COPY --chown=nextjs:nodejs ./.next/standalone ./
  15. COPY --chown=nextjs:nodejs ./.next/static ./.next/static
  16. COPY --chown=nextjs:nodejs ./public ./public
  17.  
  18. EXPOSE 3000
  19.  
  20. CMD ["node", "server.js"]
  21.  
Advertisement
Add Comment
Please, Sign In to add comment