pnpm-next-docker
pnpm-next-docker copied to clipboard
For apps running Next.JS that want the fastest possible build time
Docker Image for NextJS
⚡️ For apps running Next.JS that want the fastest possible build time ⚡️
Features
- 🏔 Build on the node:alpine flavor, a trusted & well-maintained base image
- 🌩 Installs with pnpm using the fetch protocol, much faster than
pnpm installfor docker builds - 📦 Builds into a standalone build, ultimately shipping smaller code to the container
Usage
- Copy
Dockerfile&.dockerignoreinto your existing Next.JS app - Add
{'output': 'standalone'}to yournext.config.jsfile- See
Dockerfile:28for more details on if you should opt-out of this behavior
- See
export.module = {
'output': 'standalone',
...otherConfig
}
Contributing
PRs are always welcome
License
MIT License