From e61317d3181fb0ff5bcb59f454f1563a9b9b8990 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Tue, 27 Feb 2018 18:44:59 +0100 Subject: [PATCH] Setup cron --- 11.0/fpm-alpine/Dockerfile | 16 +++++++++++----- 12.0/fpm-alpine/Dockerfile | 16 +++++++++++----- 13.0/fpm-alpine/Dockerfile | 16 +++++++++++----- Dockerfile-alpine.template | 16 +++++++++++----- 4 files changed, 44 insertions(+), 20 deletions(-) diff --git a/11.0/fpm-alpine/Dockerfile b/11.0/fpm-alpine/Dockerfile index 87ff9a7..3a84692 100644 --- a/11.0/fpm-alpine/Dockerfile +++ b/11.0/fpm-alpine/Dockerfile @@ -1,10 +1,16 @@ FROM php:7.1-fpm-alpine -# entrypoint.sh dependencies -RUN apk add --no-cache \ - bash \ - coreutils \ - rsync +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apk add --no-cache \ + bash \ + coreutils \ + rsync \ + ; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html diff --git a/12.0/fpm-alpine/Dockerfile b/12.0/fpm-alpine/Dockerfile index d0aa177..b58dbb5 100644 --- a/12.0/fpm-alpine/Dockerfile +++ b/12.0/fpm-alpine/Dockerfile @@ -1,10 +1,16 @@ FROM php:7.1-fpm-alpine -# entrypoint.sh dependencies -RUN apk add --no-cache \ - bash \ - coreutils \ - rsync +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apk add --no-cache \ + bash \ + coreutils \ + rsync \ + ; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html diff --git a/13.0/fpm-alpine/Dockerfile b/13.0/fpm-alpine/Dockerfile index 35c34cd..0c43004 100644 --- a/13.0/fpm-alpine/Dockerfile +++ b/13.0/fpm-alpine/Dockerfile @@ -1,10 +1,16 @@ FROM php:7.1-fpm-alpine -# entrypoint.sh dependencies -RUN apk add --no-cache \ - bash \ - coreutils \ - rsync +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apk add --no-cache \ + bash \ + coreutils \ + rsync \ + ; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index 5097d9a..8fecc85 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -1,10 +1,16 @@ FROM php:7.1-%%VARIANT%% -# entrypoint.sh dependencies -RUN apk add --no-cache \ - bash \ - coreutils \ - rsync +# entrypoint.sh and cron.sh dependencies +RUN set -ex; \ + \ + apk add --no-cache \ + bash \ + coreutils \ + rsync \ + ; \ + \ + mkdir -p /var/spool/cron/crontabs; \ + echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html