Last active
August 29, 2015 14:18
-
-
Save hhua/ef5f06ad38a273726861 to your computer and use it in GitHub Desktop.
Cron on Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:0.10.35 | |
RUN apt-get update && apt-get install -y cron rsyslog | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
RUN ln -s /usr/src/app/lib/sample_cron /etc/cron.d/sample_cron | |
RUN touch /var/log/cron.log | |
CMD rsyslogd && cron && tail -f /var/log/syslog /var/log/cron.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* * * * * root echo "Hello World" >> /var/log/cron.log 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment