A simple Hello World web app implemented in NodeJS, containerized with Docker.
899
A simple Hello World web app implemented in NodeJS, containerized with Docker.
docker pull bshef/hello-nodejs
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.
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.
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.
Content type
Image
Digest
Size
151.6 MB
Last updated
over 10 years ago
docker pull bshef/hello-nodejs