This is an example for how to build a teeny, tiny Docker image for your Node programs.
This example is an web server that prints Hello World and ends up in small Docker image:
We only have one dependency, so let's get it and vendor it:
docker run --rm -v "$PWD":/app -w /app iron/node:dev npm install
docker run --rm -it -p 8080:8080 -v "$PWD":/app -w /app iron/node node server.js
Check localhost:8080 to ensure it's running.
docker build -t treeder/tiny-node:latest .
Now that we built the image, let's run it.
docker run --rm -it -p 8080:8080 treeder/tiny-node
Surf to: http://localhost:8080/
Boom.
To build the fat version, change all the iron/node bits to node:argon.