Sign inSign up

alehungate/ssl-offloader

By alehungate

•Updated about 3 years ago

Image
0

274

alehungate/ssl-offloader repository overview

⁠ssl-offloader

A simple SSL Offloader that can be tightly integrated with a host that has certbot updating the required certificate.

This SSL offloader is designed to handle one target application only.

To use this container, you must use --link <container_name>:srchst - The link alias MUST be srchst

You can specify which port srchst is listening on, this defaults to 80 if not specified. This port does not need to be exposed, in fact if you expose port 80 on SSL Offloader instead you will get a redirect to https.

⁠Usage

srchost - Required. A link to the container that ssl-offloader is offloading for. Syntax --link my-other-container-name:srchost

⁠Variables

SRCPORT - Optional. The port that srchost is listening on instead of port 80. Syntax -e SRCPORT=8080

⁠Volumes

/certs - Required. Contains files fullchain.pem (The full X509 certificate chain) and privkey.pem (the X509 private key). Syntax -v /path/to/certs:/certs

⁠Examples

⁠Expose my-app over https and http

Here you can see that my-app is listening on 80, while ssl-offloader is listening on 443

docker run --restart=always --name my-app --hostname="$(hostname -f)" -d -p 80:80 my-app:latest

docker run --restart=always --name ssl --hostname="$(hostname -f)" -d --link my-app:srchst -p 443:443 -v /etc/letsencrypt/live/my-app.example.com:/certs ssl-offloader:latest
⁠Expose my-app only over https with a http to https redirect

Here you can see that ssl-offloader is listening on 80 and 443

docker run --restart=always --name my-app --hostname="$(hostname -f)" -d my-app:latest

docker run --restart=always --name ssl --hostname="$(hostname -f)" -d --link my-app:srchst -p 80:80 -p 443:443 -v /etc/letsencrypt/live/my-app.example.com:/certs ssl-offloader:latest
⁠Expose my-app only over https

Here you can see that ssl-offloader is listening on 443, and nothing is listening on 80

docker run --restart=always --name my-app --hostname="$(hostname -f)" -d my-app:latest

docker run --restart=always --name ssl --hostname="$(hostname -f)" -d --link my-app:srchst -p 443:443 -v /etc/letsencrypt/live/my-app.example.com:/certs ssl-offloader:latest

Tag summary

Content type

Image

Digest

sha256:dada3734f…

Size

5.7 MB

Last updated

about 3 years ago

docker pull alehungate/ssl-offloader