Dockerizando un Node.js web app - Hola Mundo
$ docker build -t frankyjquintero/node-web-app .
$ docker images
# Example
REPOSITORY TAG ID CREATED
node argon 539c0211cd76 3 weeks ago
frankyjquintero/node-web-app latest d64d3505b0d2 1 minute ago
$ docker run -p 49160:8080 -d frankyjquintero/node-web-app
# Get container ID
$ docker ps
# Print app output
$ docker logs <container id>
# Example
Running on http://localhost:8080
# Enter the container
$ docker exec -it <container id> /bin/bash
$ docker ps
# Example
ID IMAGE COMMAND ... PORTS
ecce33b30ebf frankyjquintero/node-web-app:latest npm start ... 49160->8080
$ curl -i localhost:49160
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 12
Date: Sun, 02 Jun 2013 03:53:22 GMT
Connection: keep-alive
$ localhost:49160
Content type
Image
Digest
Size
22.7 MB
Last updated
about 7 years ago
docker pull frankyjquintero/hello-world-nodejs-docker