From 182d7d9b5632a007ae2f2b7908b809007eee13ea Mon Sep 17 00:00:00 2001 From: Jake Buchholz Date: Sat, 4 Apr 2020 12:57:28 -0700 Subject: [PATCH] Docker crontab fixes Reinstall crontab when container is run in 'daemon' mode. This is necessary to... * use a new random minute instead of the one determined at build time * respect any acme.sh environment variables being passed to the container. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5112bf07..95085f89 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 \n \ trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \ crond && while true; do sleep 1; done;\n \ else \n \