]> purplebirdman git - web-certificates.git/blob - fetch-certificates.sh
Make sure the local docker image is always up to date
[web-certificates.git] / fetch-certificates.sh
1 #!/bin/bash
2 # source: https://eff-certbot.readthedocs.io/en/latest/install.html#alternative-1-docker
3
4 # make sure the local image is always up to date
5 docker image pull certbot/dns-route53
6
7 # run local instance only long enough to collect the certificate
8 docker run --rm --name certbot \
9             -v "/etc/letsencrypt:/etc/letsencrypt" \
10             -v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
11             -v "$HOME/.aws:/aws" \
12             -e "AWS_CONFIG_FILE=/aws/config" \
13             -e "AWS_SHARED_CREDENTIALS_FILE=/aws/credentials" \
14             -p 80:80 \
15             certbot/dns-route53 certonly -n \
16             --dns-route53 -v -d 'purplebirdman.com,*.purplebirdman.com'