SSL certificate with Let’s Encrypt (Certbot) and Docker

I’m going to use certbot/certbot docker container to generate the SSL certificate provided by Let’s Encrypt

docker run -it --rm \
-v /etc/letsencrypt:/etc/letsencrypt \
-v /var/lib/letsencrypt:/var/lib/letsencrypt \
-v PATH_TO_YOUR_WWW_DIRECTORY:/data/letsencrypt \
-v /var/log/letsencrypt:/var/log/letsencrypt \
certbot/certbot \
certonly --webroot \
--email email@example.com --agree-tos --no-eff-email \
--webroot-path=/data/letsencrypt \
-d example.com -d www.example.com