diff --git a/docker/Dockerfile b/docker/Dockerfile index 3e1b25e..0b0c1cf 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -21,10 +21,11 @@ ADD https://api.github.com/repos/chrisb86/nsupdate/git/refs/heads/main /.git-has COPY nsupdate.sh /usr/local/bin/nsupdate.sh RUN chmod +x /usr/local/bin/nsupdate.sh -COPY docker/entrypoint.sh /entrypoint.sh -RUN chmod +x /entrypoint.sh -ENTRYPOINT ["/entrypoint.sh"] -CMD ["cron","-f", "-l", "2"] +## Setup cron job +RUN echo "${SCHEDULE} sh /usr/local/bin/nsupdate.sh" >> /etc/crontabs/root + +## Start crond +CMD [ "crond", "-l", "2", "-f" ] VOLUME /config VOLUME /log