Skip to content

Instantly share code, notes, and snippets.

@juusujanar
Forked from mhubig/Dockerfile
Last active August 15, 2017 11:35
Show Gist options
  • Save juusujanar/00a8abf3d6408391d8c6353dda99b635 to your computer and use it in GitHub Desktop.
Save juusujanar/00a8abf3d6408391d8c6353dda99b635 to your computer and use it in GitHub Desktop.
Alpine Linux based cronjob runner
FROM alpine:latest
RUN apk add --update php python py-pip mysql-client \
&& pip install awscli \
&& rm -rf /var/cache/apk/*
RUN touch crontab.tmp \
&& echo '* */6 * * * /usr/bin/php /var/www/partkeepr/app/console partkeepr:cron:run' > crontab.tmp \
&& echo '0 2 * * * /usr/bin/sql_backup' >> crontab.tmp \
&& crontab crontab.tmp \
&& rm -rf crontab.tmp
CMD ["/usr/sbin/crond", "-f", "-d", "0"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment