Dockerfile 734 Bytes
Newer Older
1
FROM oeru/php72-fpm
2
3
MAINTAINER Dave Lane <dave@oerfoundation.org> (@lightweight)

4
# note: cron is already installed.
5

6
# set up cron tasks
7
8
9
10
11
12
13
14
15
16
17
RUN set -ex \
    && { \
        echo '# cron jobs for Multisite Wordpress - dave@oerfoundation.org'; \
        echo 'PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin'; \
        echo 'OUT=/var/log/cron.log'; \
        echo '# cron every 5 minutes'; \
        echo '*/5 * * * * www-data php /var/www/html/wp-cron.php >> $OUT'; \
        echo '# Just testing'; \
        echo '*/5 * * * * www-data echo "Running cron at $(date)" >> $OUT '; \
        echo '# empty line'; \
    } | tee /etc/cron.d/wpms-cron
18
19

RUN touch 0644 /var/log/cron.log
20

21
CMD cron && tail -f /var/log/cron.log