maximelebastard / docker-uhttpd

A Docker micro image for uhttpd, a tiny, lightweight web server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-alpine-uhttpd

A Docker micro image for uhttpd, a tiny, lightweight web server. The image is built using [alpine][alpine]. If you need a quick and small static HTTP server, give this one a go!

Getting the Image

This image is hosted on the Docker index as a trusted build and can be pulled down with:

	docker pull maximelebastard/uhttpd

Usage

To run a simple detached container:

	docker run -d -p 80 maximelebastard/alpine-uhttpd

If you want to serve the contents of the current directory in the container (warning, the directory will be local to the system running the docker daemon):

	docker run -d -p 80 -v `pwd`:/www maximelebastard/alpine-uhttpd

Alternatively, you can use the data container pattern by creating a "data" container and mounting its volumes into the web server container. Let's use named containers to make this easier:

	docker run -v /www --name www_data busybox true
	docker run -d -p 80 --volumes-from www_data --name www maximelebastard/alpine-uhttpd

For fun, we'll run a container just to create an index file:

	docker run --rm --volumes-from www_data busybox \
		/bin/sh -c 'echo "<h1>Hey there</h1>" > /www/index.html'

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add support for feature')
  4. Push to the branch (git push origin my-new-feature)

Authors

Created and maintained by Fletcher Nichol (fnichol@nichol.ca).

License

MIT (see License.txt)

About

A Docker micro image for uhttpd, a tiny, lightweight web server

License:MIT License


Languages

Language:Dockerfile 78.5%Language:Shell 21.5%