The Docker configuration in this repository enables the running of a Next.js application using Alpine Linux with a multistage build.
- Docker installed on your machine
-
Copy this Docker image into your Next.js repository.
-
Ensure your next.config.js has
output: 'standalone'
. See what standalone output means. -
Build the Docker image:
docker build -t your-image-name .
-
Run the Docker container:
docker run -p 3000:3000 your-image-name
-
Open your browser and visit
http://localhost:3000
to see the Next.js application running.
This project is licensed under the MIT License - see the MIT file for details.