Docker-Deploy Dockerizing a Node.js web app
docker build . -t <your username>/node-web-app>
# Example
REPOSITORY TAG ID CREATED
node 16 3b66eb585643 5 days ago
<your username>/node-web-app latest d64d3505b0d2 1 minute ago
docker run -p 49160:8080 -d <your username>/node-web-app
$ docker ps
# Print app output
$ docker logs <container id>
# Example
Running on http://localhost:8080
# Example
ID IMAGE COMMAND ... PORTS
ecce33b30ebf <your username>/node-web-app:latest npm start ... 49160->8080
$ curl -i localhost:49160
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 12
ETag: W/"c-M6tWOb/Y57lesdjQuHeB1P/qTV0"
Date: Mon, 13 Nov 2017 20:53:59 GMT
Connection: keep-alive
Hello world