-
-
Save peterwillcn/fd3da3c2e82756bf428839616905d2a7 to your computer and use it in GitHub Desktop.
Alpine Linux based cronjob runner
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 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