Run thomass/pound-certbot to gather certificates for your domains and store them in a volume shared to pound:
docker run --rm -p 443:443 \
-v etc_letsencrypt:/etc/letsencrypt \
-e [email protected] \
-e DOMAIN=example.com \
-e DOMAINS=one.example.com,two.example.com,three.example.com,four.example.com \
thomass/pound-certbot
When starting pound it must instantaneous be connected to the network all backends resides in, as it resolves the IP adresses on start. Pound fails to start when at least one backend could not be resolved.
docker run -it --rm \
-p 80:80 -p 443:443 \
-v etc_letsencrypt:/etc/letsencrypt
-e DOMAIN=example.com \
-e tiller_json='{ "hosts": [ \
{ "subdomain": "one"},\
{ "subdomain": "two", "port": "8080"},\
{ "subdomain": "three", "internal_dns": "custom-backend"},\
{ "subdomain": "four", "internal_dns": "other-backend", "port": "3000"} ] }' \
thomass/pound && \
docker network connect reverseproxy pound
- one.example.com points to backend https://one:80
- two.example.com points to backend https://two:8080
- three.example.com points to backend https://custom-backend:80
- four.example.com points to backend https://other-backend:3000