Skip to content

Latest commit

 

History

History

docker

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Docker

Dockerize a next.js project for deployment.

Setup

Steps taken to build a docker image.

  1. Change the next.js configuration file to make the project a standalone app.

    module.exports = {
      output: 'standalone',
      // ...
    }
  2. Build the docker image.

    npm run docker-build
  3. Run the app as a container.

    npm run docker-up
  4. Navigate to http://localhost:3000.