From 1e17542493b2e67a3b21b9acd63ee58fdc100b1c Mon Sep 17 00:00:00 2001 From: Max Regan Date: Wed, 4 Dec 2019 05:35:28 +0000 Subject: [PATCH] Install update-dns.sh in the Image and add a cronjob --- Dockerfile | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f0a9878..3e9db90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,16 @@ RUN apk -v --update add \ less \ mailcap \ jq \ + cron \ && \ pip install --upgrade awscli==1.14.5 s3cmd==2.0.1 python-magic && \ apk -v --purge del py-pip && \ - rm /var/cache/apk/* \ No newline at end of file + rm /var/cache/apk/* + +COPY ./update-dns.sh /usr/local/bin/ +RUN chmod +x /usr/local/bin/update-dns.sh + +RUN echo -e "*/10 * * * * update-dns.sh > /proc/1/fd/1 2>/proc/1/fd/2\n" > /etc/cron.d/dns-cron +RUN crontab /etc/cron.d/dns-cron + +CMD ["cron", "-f"] \ No newline at end of file