Skip to content

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

License

Notifications You must be signed in to change notification settings

fnichol/docker-uhttpd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

docker-uhttpd

A Docker micro image for uhttpd, a tiny, lightweight web server. The image is built using progrium/busybox to keep the footprint as small as possible. 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 fnichol/uhttpd

Usage

To run a simple detached container:

	docker run -d -p 80 fnichol/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 fnichol/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 fnichol/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 ([email protected]).

License

MIT (see License.txt)

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages