Skip to content

mgred/althttpd-docker

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 

althttpd docker

A tiny docker image FROM scratch running a static build of althttpd.

Build

Build the latest version:

make

This will create an image named althttpd:latest.

With TLS support

Set TLS to any value:

make TLS=1

This will set the name to althttpsd:latest. To control the name of the image use the NAME variable.

From a particular Check-in

Use a hash like 0a03b61432d41837:

make CHECKIN=0a03b61432d41837

The image is then named althttpd:0a03b61432d41837.

Use

Publish a given directory:

make run DIR=/path/to/content

See the content at http://localhost:8080. The port can be customized using the PORT variable.

Examples

With logging:

docker run --rm \
  --publish 8080:8080 \
  --volume $(pwd)/index.html:/www/index.html \
  --volume $(pwd)/site.log:/site.log \
  althttpd:latest -logfile /site.log

Acknowledgement

Previous work & inspiration: