How to deploy NodeJS application to Heroku using docker
Create a project in your local
Create simple NodeJS application
server.js
Write your docker file
Build the image on top of light weight linux (alpine) and install express.
Dockerfile
Login to heroku cli
Login to heroku container
Create target application
Connect you local git to remote heroku git
Build the image and push to Container Registry
Then release the image to your app
Verify the nodeJS application in your browser
Logout the container when you're done
Last updated
Was this helpful?