From 38584cb3afc01459fb7589f4967710f4fea99953 Mon Sep 17 00:00:00 2001 From: Jake Buchholz Date: Thu, 2 Apr 2020 18:35:35 -0700 Subject: [PATCH] Fix Docker crontab Entry * avoids using the hardcoded default minute set when image is built - everyone gets a different minute every time they `docker run neilpang/acme.sh:latest daemon` * allows specification of LE_CONFIG_HOME environment variable if configuration home is not at image build-time default - `docker run -e LE_CONFIG_HOME=/tmp neilpang/acme.sh:latest daemon` --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5112bf07..4b51ea61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,6 +58,8 @@ RUN for verb in help \ RUN printf "%b" '#!'"/usr/bin/env sh\n \ if [ \"\$1\" = \"daemon\" ]; then \n \ + acme.sh --uninstall-cronjob \n \ + acme.sh --install-cronjob --config-home \"\$LE_CONFIG_HOME\" \n \ trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \ crond && while true; do sleep 1; done;\n \ else \n \