HTTPS certificates make easy using docker + certbot.
530
This docker image makes it easier to setup and renew HTTPS certificates using certbot.
To generate certificates, stop your web server and run the following:
$ docker run --rm -it --volume /etc/letsencrypt:/etc/letsencrypt -p 443:443 anandology/certbot certbot certonly -n --standalone --agree-tos -m {{your_email}} -d {{domain1}} -d {{domain2}}
The certbot certificates are valid only for 30 days and they have to be renewed periodically.
Run the following to renew the certificates:
$ docker run --rm -it --volume /etc/letsencrypt:/etc/letsencrypt anandology/certbot certbot renew
You may want to run the above periodically in a crontab. Here is the same crontab entry:
48 21 * * * docker run --rm -it --volume /etc/letsencrypt:/etc/letsencrypt anandology/certbot certbot renew
Content type
Image
Digest
Size
49.2 MB
Last updated
about 8 years ago
docker pull anandology/certbot