]> purplebirdman git - web-certificates.git/blob - docker-run-certbot.sh
Broke out scripts to more easily access certbot
[web-certificates.git] / docker-run-certbot.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 "$@"