Adds Docker support for Next.js standalone
All checks were successful
Lint / Lint and Typecheck (push) Successful in 48s

Adds a production-ready Dockerfile and .dockerignore, and updates Next.js config to produce a standalone output.

Provides a multi-stage build that installs dependencies (yarn/npm/pnpm supported), runs the Next.js build, and assembles a slim runtime image on Node Alpine. Configures a non-root runtime user, exposes PORT 3000, and includes runtime utilities and compatibility packages to ensure reliable container execution. These changes enable consistent, smaller production container images and simplified deployment.
This commit is contained in:
2025-12-09 13:46:54 +01:00
parent dc9cf1c1f2
commit 17a694d4b5
3 changed files with 79 additions and 1 deletions

7
.dockerignore Normal file
View File

@@ -0,0 +1,7 @@
Dockerfile
.dockerignore
node_modules
npm-debug.log
README.md
.next
.git