This is a basic nginx container built upon the alpine:latest image. You can use this container as a reverse proxy or to convert your connection into SSL. It supports a recent openssl version so you are able to use most, if not all, recent openssl features even if your base OS does not support it. I use this docker container myself for access to different web tools I host both internet and locally connectable. It also prevents you from having to expore multiple ports and/or IP addresses for every single site running in Docker.
Base image: ubuntu:focal
Main software: nginx
Packages: nginx, openssl, shadow, tzdata
services:
proxy:
image: jerheij/proxy:stable
container_name: proxy
restart: always
ports:
- 80:80
- 443:443
environment:
TZ: 'Europe/Amsterdam'
UUID: 2002
GUID: 2002
volumes:
- proxy/conf.d:/etc/nginx/conf.d
- proxy/ssl:/etc/nginx/ssl
- proxy/logs:/var/log/nginx
The volumes mounted in the example above are to provide easy access to log files, easy access to the local SSL directory and easy access to configuration files without having to map every single file by itself. The only mount required is one that provides a basic configuration file.
This container supports all basic functionality provided by nginx and configurable by nginx.
In the example above I have mapped a volume to /etc/nginx/ssl in the container to be able to add all certificates to my SSL folder and link them through the configuration.
Variable | Function | Optional |
---|---|---|
TZ |
Timezone for PHP configuration | no |
UUID |
UID of the apache user, for mount and persistence compatibility | yes |
GUID |
GID of the apache group, for mount and persistence compatibility | yes |
I have introduced a "stable" tag instead of the "latest". The "latest" tag will be the git "master" branch while the "stable" tag will be the latest git tag.
For changes in the different versions see my github repo's commit messages.
Jerheij