Public Repository

Last pushed: 2 years ago
Short Description
Ubuntu container and simple node app to experiment with container port forwarding.
Full Description

README

This is built on top of the latest ubuntu image (at the time of posting) provisioned with nodejs, npm and express.

Quickstart

  • docker run -d -p 8080:3000 chuckwired/port-tutorial /usr/bin/nodejs /home/hello-world/app.js
  • curl localhost:8080
  • Observe that "Hello world!" is printed out despite nodejs running on port 3000

In depth

Run this container with the /usr/bin/nodejs /home/hello-world/app.js &, and the -p 8080:3000 (change 8080 to any port you wish). Then on the docker daemon machine you can "curl localhost:8080" to see that your container has exposed the application!

Docker Pull Command
Owner
chuckwired

Comments (0)