#LetsEncrypt Certbot with Alpine Linux v0.9.3
1. Add aliases to your web server for all domains you need cert:
nginx:
location /.well-known/ { alias /usr/share/nginx/html/.well-known/; }
httpd:
Alias /.well-known/ /usr/share/nginx/html/.well-known/
2. Fetch certs
docker run -it --rm -v /etc/ssl/letsencrypt:/etc/letsencrypt/ \
-v /usr/share/nginx/html/:/var/www/ fserver/certbot \
certbot certonly --agree-tos -t -m [email protected] \
--webroot -w /var/www/ -d domain.com -d www.domain.com
3. Update certs manualy with
docker run -it --rm -v /etc/ssl/letsencrypt:/etc/letsencrypt/ \
-v /usr/share/nginx/html/:/var/www/ \
fserver/certbot certbot renew
or add to crontab:
echo "1 1 * * sat root docker run -it --rm -v /etc/ssl/letsencrypt:/etc/letsencrypt/ -v /usr/share/nginx/html/:/var/www/ fserver/certbot certbot renew" >> /etc/crontab
will try to update certs every week
Docker: fserver/certbot
Content type
Image
Digest
Size
18.8 MB
Last updated
almost 9 years ago
docker pull fserver/certbot