
camcamfresh/certbotSome simple code that retrieves and renews SSL certificates for multiple domains authenticated with LuaDNS.
The Dockerfile pulls from alpine:latest and installs the required dependencies for certbot & certbot's luadns plugin which is used for DNS authentication.
Certbot is set to run every 6 hours (4 times/day) using cron. However, it can manually be run by running the following shell script found within the container: /bin/certbot/certbot.sh.
There are 3 environment variables that must be set in order for certbot to execute properly.
dockerfileENV DOMAINS="example.com,*example.com example.org,*example.org ***.example.org" ENV EMAIL="***" ENV CONFIG_DIR="/config"
DOMAINS value above would result in three separate certificates (two encompassing multiple domains).luadns.ini must have the domain's luadns email & api token.certs/ contains the SSL certificate files. (Note: These are not symbolic links and should prevent any Docker volume mapping issues.)data/ contains certbot's pervious work and archives.It is highly recommended that one map the configuration directory when running the container; this will save certbot's previous work in the event of failure. In doing so, we decrease the chances of ever reaching the request rate limit for let's encrypt.
Enviroment variables should be set prior to testing this container.
example.com is a reserved TLD and will be automatically rejected by certbot.
bashdocker run -e DOMAINS='example.com,*.example.com example.org,*.example.org ***.example.org' -e EMAIL='***' -v /config/:/config/ camcamfresh/certbot
Using this current code requires the use of LuaDNS as a DNS provider. However it can quickly be changed to another DNS provider by forking the code and changing the dns-plugin to another supported DNS provider (see Certbot's website for available providers).






manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务