Automatic nginx-proxy docker image with letsencrypt ssl cert

As a docker user, you must know the famous nginx-proxy project.

I just forked it, and added a new ENABLE_ACME variable to enable automatic letsencrypt ssl cerrt.

It’s very easy to use:

1. run the proxy:

docker run  \
-p 80:80 \
-p 443:443 \
-it  -d --rm  \
-v /var/run/docker.sock:/tmp/docker.sock:ro  \
-v $(pwd)/proxy/certs:/etc/nginx/certs \
-v $(pwd)/proxy/acme:/acmecerts \
-v $(pwd)/proxy/conf.d:/etc/nginx/conf.d \
--name proxy \
neilpang/nginx-proxy

2. run web server with "-e ENABLE_ACME=true":

docker run -itd --rm \
-e VIRTUAL_HOST=foo.bar.com \
-e ENABLE_ACME=true \
httpd

3. All the other options and functions are same as the upstream.

3 Likes

excellent work!

Will try it later

very nice @Neilpang :slight_smile:

thanks for sharing

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.