diff --git a/Dockerfile b/Dockerfile index abf6b97..43bdf85 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,10 +10,16 @@ RUN apk add --no-cache --virtual .build-deps git \ && rm -r /root/.cache \ && cd /tmp \ - && git clone https://github.com/lukas2511/dehydrated.git --depth 1 \ + && git clone https://github.com/lukas2511/dehydrated.git \ + && cd dehydrated \ + && git checkout tags/v0.4.0 \ + && cd .. \ && chmod a+x dehydrated/dehydrated \ && mv dehydrated/dehydrated /usr/bin/ \ - && git clone https://github.com/AnalogJ/lexicon.git --depth 1 \ + && git clone https://github.com/AnalogJ/lexicon.git \ + && cd lexicon \ + && git checkout tags/v2.1.8 \ + && cd .. \ && chmod a+x lexicon/examples/dehydrated.default.sh \ && mv lexicon/examples/dehydrated.default.sh /usr/bin/dehydrated-dns \ && rm -rf /tmp/* \ diff --git a/README.md b/README.md index f13d02f..b1b9897 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ COPY config /etc/dehydrated/config LOG=TRUE # defaults to `staging`, use `production` when ready. LE_ENV=staging +# CSV list of domains +LE_DOMAIN= # Only required if you plan to use dns-01 challenges (use for private services) # CloudFlare example PROVIDER=cloudflare @@ -47,7 +49,8 @@ docker run \ --env-file letsencrypt.env \ letsencrypt \ dehydrated \ - --cron --domain letsencrypt.willfarrell.ca \ + --cron --accept-terms \ + --domain letsencrypt.willfarrell.ca \ --hook dehydrated-dns \ --challenge dns-01 \ --force @@ -57,7 +60,8 @@ docker run -d \ --env-file letsencrypt.env \ letsencrypt \ dehydrated \ - --cron --domain letsencrypt.willfarrell.ca \ + --cron --accept-terms \ + --domain letsencrypt.willfarrell.ca \ --challenge http-01 \ --force diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index a658a4f..a2d2b3c 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -20,5 +20,12 @@ else echo "***** staging *****" fi +# comma = new line +if [ "${LE_DOMAIN}" ]; then + echo "***** Creating domains.txt *****" + echo ${LE_DOMAIN} | sed -e $'s/,/\\\n/g' > /etc/dehydrated/domains.txt + cat /etc/dehydrated/domains.txt +fi + echo "${@}" exec "${@}"