Let's encrypt and certbot
Obtain certificate from Let’s Encrypt using Certbot in STANDALONE mode
As one line
sudo docker run -it --rm -p 443:443 -p 80:80 -v /home/user/someFolder/etc/letsencrypt:/etc/letsencrypt -v /home/user/someFolder/var/lib/letsencrypt:/var/lib/letsencrypt -v /home/user/someFolder/var/log/letsencrypt:/var/log/letsencrypt certbot/certbot certonly --email your.email@email.com --agree-tos --no-eff-email --rsa-key-size 4096 --authenticator standalone -d yourDnsName
or with line breaks
sudo docker run -it --rm -p 443:443 -p 80:80 \
-v /home/user/someFolder/etc/letsencrypt:/etc/letsencrypt \
-v /home/user/someFolder/var/lib/letsencrypt:/var/lib/letsencrypt \
-v /home/user/someFolder/var/log/letsencrypt:/var/log/letsencrypt \
certbot/certbot certonly \
--email your.email@email.com --agree-tos --no-eff-email \
--rsa-key-size 4096 --authenticator standalone -d yourDnsName