Working example of dockerizing a Next.js app using multi-stage builds.
See the corresponding blog post: https://johnnymetz.com/posts/dockerize-nextjs-app/
docker compose build
docker compose up -d
- Production mode app: http://localhost:3000/
- Development mode app: http://localhost:3001/