Skip to content

Latest commit

 

History

History
20 lines (15 loc) · 748 Bytes

deploy-with-docker.md

File metadata and controls

20 lines (15 loc) · 748 Bytes

Deploy with Docker

Follow the official Next.js repo docker build example and instructions to deploy with docker. Copy the Dockerfile into the root of the project and modify the next.config.js file:

// next.config.js
module.exports = {
  // ... rest of the configuration.
  output: 'standalone',
}

You can now build the docker image and run it:

docker build -t nextjs-docker .
docker run -p 3000:3000 nextjs-docker

Alternatively, to use docker compose, refer to the docker compose repo.