Skip to content

Instantly share code, notes, and snippets.

@hhua
Last active August 29, 2015 14:18
Show Gist options
  • Save hhua/ef5f06ad38a273726861 to your computer and use it in GitHub Desktop.
Save hhua/ef5f06ad38a273726861 to your computer and use it in GitHub Desktop.
Cron on Docker
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
* * * * * 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