You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jake Howard 19e34780a9
Remove healthcheck
2 weeks ago
.github/workflows Test Nginx config 1 year ago
Dockerfile Remove healthcheck 2 weeks ago
LICENSE Create LICENSE 5 months ago Document that the user can be configured 2 months ago
default.conf Add missing trailing semi 11 months ago
docker-compose.yml Init docker workflow 1 year ago Quote variable 2 months ago

Docker Static Server


Customizable and performant static file server - powered by Nginx.

Note: This container is designed for hosting static files, rather than for serving a static site.

"Why not just use nginx:alpine?"

If you're not really bothered, the default nginx container will work just fine for you, however this container has a few modifications which make it more suited to serving static files:

  • Use environment variables for customization
  • Healthcheck endpoint
  • GZIP all files
  • Use X-Forwarded-For header when getting client IP

Nginx makes a brilliant file server regardless of how you use it.


version: "2.3"

    image: theorangeone/static-server:latest
      - ".:/srv:ro"
      - "80:80"

The server will serve files in the /srv directory. This directory can be mounted read-only.


This image supports some customizations:

  • $INDEX (on / off): Enable file listing, powered by autoindex
  • $FANCY_INDEX (on / off): Enable file listing, powered by fancy_index
  • $PUID: Set the user nginx runs as (default 1000)