Sign inSign up

jcenzano/docker-webserver

By jcenzano

•Updated about 9 years ago

Simple webserver into docker (uses shared volumes), it is based on node-static

Image
1

926

jcenzano/docker-webserver repository overview

⁠docker-webserver

Simple webserver into docker (uses shared volumes), it is based on node-static⁠

⁠Pulling docker image from docker hub

  1. Ensure you have docker⁠ installed
  2. Type: docker pull jcenzano/webserver

⁠Creating the docker image locally (optional)

  1. Ensure you have docker docker⁠ and make installed
  2. Type make

⁠Testing the image

  1. You should create a HTML test file first, such as:
echo "It works." > /tmp/test.html
  1. You can run the webserver against the previous directory typing:
docker run --rm -itd -v /tmp:/root/media -p 8080:8080 jcenzano/webserver /root/media -a 0.0.0.0 -p 8080 

The previous command offer through HTTP the contents of local /tmp/ dir

  1. Using your browser navigate to http://localhost:8080/test.html, you shold see "It works."

The docker container options are the options of node-static⁠

Tag summary

Content type

Image

Digest

Size

113.8 MB

Last updated

about 9 years ago

docker pull jcenzano/docker-webserver