From e9069ae211fa6b869e816371c7b1eb8a0e126ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Val=C3=AD=C4=8Dek=20=28YCNet=29?= Date: Sun, 28 Oct 2018 16:39:13 +0100 Subject: [PATCH] Add crontab --- Dockerfile | 3 +-- crontab | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 crontab diff --git a/Dockerfile b/Dockerfile index d1b3b41..ea1c2b7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,8 +5,7 @@ VOLUME /data RUN apk add --no-cache git bash openssh parallel openssh-keygen vim shadow RUN useradd --uid 10000 -ms /bin/bash executor -RUN chown executor:executor /data -RUN echo "* * * * * /usr/local/bin/cron-command" >> /etc/crontabs/root +ADD crontab /etc/crontabs/executor RUN apk del shadow ADD dockerbin/* checker/* src/* /usr/local/bin/ ADD executor-conf /etc/init.d diff --git a/crontab b/crontab new file mode 100644 index 0000000..e7f011c --- /dev/null +++ b/crontab @@ -0,0 +1,3 @@ +# executor crontab +* * * * * /usr/local/bin/cron-command > /home/executor/cron.log +0 0 * * * mv /home/executor/cron.log /home/executor/cron.old