Forked from https://github.com/nginx-le/nginx-le - Nginx with automatic let's encrypt
3.6K
Simple nginx image (alpine based) with integrated Let's Encrypt support.
Provide a collection of nginx configuration snippets from h5bp/server-configs-nginx
The source code can be found here
NGINX_LE_TZ=UTC. For more timezone values check /usr/share/zoneinfo directoryNGINX_LE_LETSENCRYPT=true if you want automatic certificate install and renewalNGINX_LE_EMAIL should be your email and NGINX_LE_FQDN for domainNGINX_LE_FQDN=aaa.example.com,bbb.example.comNGINX_LE_LETSENCRYPT to false and pass your own cert in NGINX_LE_SSL_CERT, key in NGINX_LE_SSL_KEY and NGINX_LE_SSL_CHAIN_CERTtemplates/service-example.conf and templates/no-ssl.service-example.conf to make your own templates/service.conf and templates/no-ssl.service.conf. Keep ssl directives as is:
ssl_certificate NGINX_LE_SSL_CERT;
ssl_certificate_key NGINX_LE_SSL_KEY;
ssl_trusted_certificate NGINX_LE_SSL_CHAIN_CERT;
volumes in docker-compose.yml changed to your service configservice*.conf and no-ssl.service*.conf (see docker-compose.yml for service2.conf)docker-compose pulldocker-compose build will do itdocker-compose upImportant: provided nginx.conf handles
http->https redirect automatically, no need to add it into your custom service.conf. In case if you need a custom server on
http (:80) port, make sure you handle /.well-known/
path needed for LE challenge.
certbot package.script/entrypoint.sh requests LE certificate and will refresh every 10 days in case if certificate is close to expiration (30day)script/le.sh gets SSL
nginx-le container.Content type
Image
Digest
Size
28.8 MB
Last updated
over 5 years ago
docker pull 0x8861/nginx-le