tserve, or tiny server is a compose file for setting up a lightweight static HTTP server using BusyBox Linux.
While ultra-small images, like Lipan's do exist, this compose file uses the Docker library BusyBox image and configures it using the compose specification to maximise architecture support and CDN availability.
Download the compose.yml file, add your static files to the ./www directory and lauch the image with Docker or Podman!
You can uncomment the mount for httpd.conf if you wish to customise how the httpd binary operates, have a look at Yorston's blog for for information
services:
serve:
image: docker.io/library/busybox:latest
restart: unless-stopped
volumes:
- ./www:/www:ro
# - ./httpd.conf:/etc/httpd.conf:ro
ports:
- 80:80
command: httpd -f -vv -h /www
init: true
healthcheck:
interval: 30s
start_period: 5s
test: wget --spider http://localhost || exit 1