pro nginx docker container - debian based with tls, openssl, htaccess and config via env [x86 + arm]
5.2K
maintained by ServerContainers
You'll find all images tagged like d11.2-ne1.18.0-6.1 which means d<debian version>-ne<nginx-extras version (with some esacped chars)>.
This way you can pin your installation/configuration to a certian version. or easily roll back if you experience any problems
(don't forget to open a issue in that case ;D).
The latest version will be updated/released after I managed to test a new pinned version in my production environment.
This way I can easily find and fix bugs without affecting any users. It will result in a way more stable container.
bullseyedh.pem with 4096 size hardcoded into repo (zero impact on build-time)4096 to 2048 to decrease build timebuildxnginx-extras debian packagedebian:buster baseimagenginx-extras debian packageThis Dockerfile (available as servercontainers/nginx) gives you a NGINX on alpine. It also generates self signed certificates and reverse proxy mechanism.
It uses debian package nginx-extras.
For Configuration of the Server you use environment Variables.
It's based on the debian:bullseye Image
View in Docker Registry servercontainers/nginx
View in GitHub ServerContainers/nginx
You can try this container with the provided docker_compose.yml which starts an mysql container with phpmyadmin and adds a reverse proxy location to the nginx.
So you can open the phpmyadmin SSL protected at https://localhost/phpmyadmin/
All options for the OpenSSL Stuff
to get an a+ rating at the qualys ssl test you need to set the Strict-Transport-Security inside your nginx configuration like this:
# only this domain
add_header Strict-Transport-Security "max-age=31536000";
# apply also on subdomains
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
NGINX_HTTP_ACTION
NGINX_HTTP_ACTION_myconfigname
NGINX_RAW_CONFIG_myconfigname
mkpasswd e.g. created with mkpasswd -m sha-512 (escape $ with $$ in docker-compose.yml)to enable authentication add the following to your nginx config (inside or outside the location tag):
auth_basic "Restricted Area"; auth_basic_user_file /conf/auth.htpasswd;
All options for the OpenSSL Stuff
You can indeed use this container as a Docker Registry Proxy with Basic Authentication. Just add some Accounts with the HTACCESS_ACCOUNT_username variables and take a look at the following NGINX_CONFIG_myconfigname configuration.
HTACCESS_ACCOUNT_marvin=MyRegistRyPasSwOrD
NGINX_CONFIG_myDockerRegistry="upstream docker-registry {server registry:5000;} server {server_name registry.example.com; include /etc/nginx/snippets/docker-registry-proxy.conf;}"
You need to specify the docker registry upstream, add a server_name necessary for the certificate generation. Most importantly include the file include /etc/nginx/snippets/docker-registry-proxy.conf; inside your server statement.
Thats all - now you have a working docker registry proxy with ssl, basic auth!
To get a WebDav Server with MacOS Support and everything, just use the following configuration with snipped.
HTACCESS_ACCOUNT_marvin=MyWebDavPassword
NGINX_CONFIG_webdavServer="server {server_name webdav.example.com; location / { auth_basic "Restricted"; auth_basic_user_file /conf/auth.htpasswd; include /etc/nginx/snippets/webdav-server.conf;} }"
Content type
Image
Digest
sha256:e3333e217…
Size
101 MB
Last updated
2 months ago
docker pull servercontainers/nginx