Skip to content

Repository files navigation

Image SizeImage LatestGitHub Tag MajorGitHub Tag MinorGitHub Tag ReleaseGitHub Release VersionWorkflow BuildWorkflow LintGitHub Last CommitGitHub Repo SizeGitHub Top LanguageGitHub ContributorsGitHub DiscussionsGitHub ForksGitHub Repo StarsGitHub Org StarsDiscordKo-fi

Docker Nginx Static

Docker Nginx Static Web Server.

cd directory-to-serve
docker run --rm -p 80:80 -v "$(pwd):/static" ghcr.io/cssnr/docker-nginx-static:latest

Options

VariableDefaultDescription of Environment Variable
STATIC/staticNginx root directory
SUID1000Directory group/user ID
NGINX_INDEXindex.html index.htmNginx directory index files
ERROR_PAGE/404.htmlNginx 404 page, set off to disable
GZIP_TYPES*Nginx gzip_types, set off to disable
GZIP_LENGTH1000Minimum content size to compress
BASIC_AUTH-Basic auth file contents
BASIC_REALMUnauthorizedMinimum content size to compress

See the src/10-setup.sh file for more details.

Basic Auth

$ htpasswd -nb user pass
user:$apr1$XFVN0nJA$IgZxtMHVAeA.Pu7ufU7/I0

Replace all $ with $$ for docker-compose.yaml files.
Use \n for newlines to add multiple credentials.

environment:
BASIC_AUTH: 'user:$$apr1$$XFVN0nJA$$IgZxtMHVAeA.Pu7ufU7/I0\nuser2:$$apr1$$vswJgdwo$$2XkDOrvJFQ2pKwrXqGeWM0'

For examples see:

Support

Please let us know if you run into any issues or want to see new features...

For general help or to request a feature, see:

If you are experiencing an issue/bug or getting unexpected results, you can:

Contributing

If you would like to submit a PR, please review the CONTRIBUTING.md.

Please consider making a donation to support the development of this project and additional open source projects.

Ko-fi

For a full list of current projects visit: https://cssnr.github.io/

About

Docker Static Web Server

Topics

Resources

Contributing

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages