RPI-compatible Automated nginx proxy for Docker containers using docker-gen
500K+
This is a fork, that enables usage on a armhf architecture (tested on RPI 3). Have a look at Jason Wilder's original repository and README. The following part does not include all available options of the original project.
Reasons and examples for using a reverse proxy are discussed by Jason Wilder or here. With a companion container for creating/renewing Let's Encrypt certificates automatically you can use it with a Raspberry Pi and DynDNS Provider to host and expose your dockerized (and now TLS-secured) applications. Examples:
Built image is hosted on Dockerhub. You can use
$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro alexanderkrause/rpi-nginx-proxy:alpine`
to start a container, but SSL support (see below) is recommended.
$ git clone https://github.com/Alexander-Krause/rpi-nginx-proxy.git$ cd rpi-nginx-proxy$ docker build -t alexanderkrause/rpi-nginx-proxy:latest .$ docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro alexanderkrause/rpi-nginx-proxyThen start any containers you want proxied with an env var VIRTUAL_HOST=subdomain.youdomain.com
$ docker run -e VIRTUAL_HOST=foo.bar.com ...
rpi-docker-letsencrypt-nginx-proxy-companion is a lightweight companion container for the nginx-proxy. It allows the creation/renewal of Let's Encrypt certificates automatically.
SSL is supported using single host, wildcard and SNI certificates using naming conventions for certificates or optionally specifying a cert name (for SNI) as an environment variable.
To enable SSL:
$ docker run -d -p 80:80 -p 443:443 -v /path/to/certs:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro alexanderkrause/rpi-nginx-proxy:alpine
The contents of /path/to/certs should contain the certificates and private keys for any virtual
hosts in use. The certificate and keys should be named after the virtual host with a .crt and
.key extension. For example, a container with VIRTUAL_HOST=foo.bar.com should have a
foo.bar.com.crt and foo.bar.com.key file in the certs directory.
You can use for example https://www.duckdns.org to expose your Nextcloud container or something else. See here for more details.
Content type
Image
Digest
Size
53.3 MB
Last updated
almost 6 years ago
docker pull alexanderkrause/rpi-nginx-proxy