Sign inSign up

bshef/hello-nodejs

By bshef

Updated over 10 years ago

A simple Hello World web app implemented in NodeJS, containerized with Docker.

Image
0

899

bshef/hello-nodejs repository overview

hello-nodejs

A simple Hello World web app implemented in NodeJS, containerized with Docker.

Pull the Docker image

docker pull bshef/hello-nodejs

Run the image

docker run -p 49160:8080 -d bshef/hello-nodejs

Running with -d runs the container in detached mode, leaving the container running in the background. The -p flag redirects a public port to a private port in the container.

Test

Hello

Assuming the container is running in a Docker machine named default, run the command:

curl $(docker-machine ip default):41960/hello

It should output a Hello world response.

View in browser

Get the IP address of the running Docker machine using the command:

docker-machine ip default

Then navigate to that IP address and Port in the browser. For example, if the IP address is 192.168.99.100, then visit 192.168.99.100:41960 in the browser.

Tag summary

Content type

Image

Digest

Size

151.6 MB

Last updated

over 10 years ago

docker pull bshef/hello-nodejs