Deploying nodejs project on docker and running the container
-> Install nodejs app on ubuntu server with deps -> configure nodejs -> and run on port 3000 -> it will be work fine -> curl http://:3000 -> Install docker on ubuntu - ce edition -> create a docker file for nodejs application on the name of Dockerfile
-> Created a docker image out of Dockerfile
-> Run a container out of existed docker image on the port 90 -> 90:8080 (implies)
-> check the container is working fine or not
-> go to browser and checkc the url -> http://:90
-> check the all existed containers ->
-> Now stop the container and remove the existed containers (docker rmi )
-> -> Log into docker hub
-> push the existed docker image into my own docker hub repo - public
-> here in ubuntu -> remove the existed docker images
-> Now pull the image from my own dockerhub (nodejs)
-> create a container out of it and ran on port 90
=----------------------------------=
Resource:
https://www.digitalocean.com/community/tutorials/how-to-build-a-node-js-application-with-docker