NGINX Certbot

You need nginx installed in your local machine

docker run -d -it --name certbot -v $HOME/certificates:/etc/letsencrypt/live --net host nginx-certbot

How to generate certificates?

docker exec -it certbot generate-cert example.com

How it works with NGINX as docker container?

docker network create nginx-certbot
docker run -d --name nginx --net nginx-certbot -p 80:80 nginx
docker run -d -it --name certbot -v $HOME/certificates:/etc/letsencrypt/live --net nginx-certbot nginx-certbot
docker exec -it certbot generate-cert example.com