Add crontab

This commit is contained in:
Václav Valíček 2018-10-28 16:39:13 +01:00
parent fbc32f7970
commit e9069ae211
No known key found for this signature in database
GPG Key ID: 7CF44871CEA75938
2 changed files with 4 additions and 2 deletions

View File

@ -5,8 +5,7 @@ VOLUME /data
RUN apk add --no-cache git bash openssh parallel openssh-keygen vim shadow RUN apk add --no-cache git bash openssh parallel openssh-keygen vim shadow
RUN useradd --uid 10000 -ms /bin/bash executor RUN useradd --uid 10000 -ms /bin/bash executor
RUN chown executor:executor /data ADD crontab /etc/crontabs/executor
RUN echo "* * * * * /usr/local/bin/cron-command" >> /etc/crontabs/root
RUN apk del shadow RUN apk del shadow
ADD dockerbin/* checker/* src/* /usr/local/bin/ ADD dockerbin/* checker/* src/* /usr/local/bin/
ADD executor-conf /etc/init.d ADD executor-conf /etc/init.d

3
crontab Normal file
View File

@ -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