This is the docker project to setup reloadable nginx based on content change and pre-defined nginx.conf.
This nginx docker repo can build nginx with dynamic module supports. It is based on extended build capacity from Nginx Official Module Support, and include module authldap.
It also provides additional nginx docker startup functions:
Use following command to setup nginx docker.
$ docker run -d --name nginx -p 80:80 -v /path/to/nginx-conf.d:/etc/nginx/conf.d fengzhou/nginx
NGINX_WATCH_INTERVAL)The default image has nginx configuration (/etc/nginx/conf.d) reloadable per 10 seconds.
NGINX_WATCH_INTERVAL=""NGINX_WATCH_INTERVAL="30s". The value can refer to shell sleep(1) command arguments.NGINX_LOAD_MODULES)The default image has a few modules (authldap, headers-more) loaded in /etc/nginx/nginx.conf file.
To adjust auto load modules, follow steps below:
docker run --rm fengzhou/nginx ls /etc/nginx/modulesNGINX_LOAD_MODULES="ngx_http_auth_ldap_module ngx_http_headers_more_filter_module"NGINX_LOG_LEVEL)The nginx default error log level is configured "warn" (comparing to offiical image setting "notice")
To adjust log level, update environment variable NGINX_LOG_LEVEL=warn.
NGINX_CONFIG_MODE)To support original docker image nginx configuration, the default setting is enable legacy mode.
NGINX_CONFIG_MODE=legacy environment variableNGINX_CONFIG_MODE=none environment variableThe detailed use LDAP auth configuration, refer to https://github.com/kvspb/nginx-auth-ldap
Content type
Image
Digest
sha256:9ddf096b5…
Size
21.2 MB
Last updated
over 1 year ago
docker pull fengzhou/nginx