From 9d461d79de35c65dc06bf59a15be573cfa0962e5 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Fri, 12 Jan 2018 14:08:12 +0100 Subject: [PATCH 1/6] Add busybox-static --- 11.0/apache/Dockerfile | 1 + 11.0/fpm/Dockerfile | 1 + 12.0/apache/Dockerfile | 1 + 12.0/fpm/Dockerfile | 1 + Dockerfile.template | 1 + 5 files changed, 5 insertions(+) diff --git a/11.0/apache/Dockerfile b/11.0/apache/Dockerfile index 6d025884..47d6d37d 100644 --- a/11.0/apache/Dockerfile +++ b/11.0/apache/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ apt-get install -y --no-install-recommends \ rsync \ bzip2 \ + busybox-static \ ; \ # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html diff --git a/11.0/fpm/Dockerfile b/11.0/fpm/Dockerfile index 5483acf4..f336ac4c 100644 --- a/11.0/fpm/Dockerfile +++ b/11.0/fpm/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ apt-get install -y --no-install-recommends \ rsync \ bzip2 \ + busybox-static \ ; \ # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html diff --git a/12.0/apache/Dockerfile b/12.0/apache/Dockerfile index d4edac22..72cdbb31 100644 --- a/12.0/apache/Dockerfile +++ b/12.0/apache/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ apt-get install -y --no-install-recommends \ rsync \ bzip2 \ + busybox-static \ ; \ # 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/Dockerfile b/12.0/fpm/Dockerfile index 0bb92dd2..7e45d565 100644 --- a/12.0/fpm/Dockerfile +++ b/12.0/fpm/Dockerfile @@ -6,6 +6,7 @@ RUN set -ex; \ apt-get install -y --no-install-recommends \ rsync \ bzip2 \ + busybox-static \ ; \ # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html diff --git a/Dockerfile.template b/Dockerfile.template index f0d8bc8d..1d9bf3ac 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -6,6 +6,7 @@ RUN set -ex; \ apt-get install -y --no-install-recommends \ rsync \ bzip2 \ + busybox-static \ ; \ # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html From 74c68d908bf6ac8c69bbdc1cd091ff03bfa5ffaa Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Tue, 30 Jan 2018 13:02:14 +0100 Subject: [PATCH 2/6] Add cron config --- 11.0/apache/Dockerfile | 1 + 11.0/fpm/Dockerfile | 1 + 12.0/apache/Dockerfile | 1 + 12.0/fpm/Dockerfile | 1 + Dockerfile.template | 1 + 5 files changed, 5 insertions(+) diff --git a/11.0/apache/Dockerfile b/11.0/apache/Dockerfile index 47d6d37d..9a33b28a 100644 --- a/11.0/apache/Dockerfile +++ b/11.0/apache/Dockerfile @@ -8,6 +8,7 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ + echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html \ diff --git a/11.0/fpm/Dockerfile b/11.0/fpm/Dockerfile index f336ac4c..32e4849a 100644 --- a/11.0/fpm/Dockerfile +++ b/11.0/fpm/Dockerfile @@ -8,6 +8,7 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ + echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html \ diff --git a/12.0/apache/Dockerfile b/12.0/apache/Dockerfile index 72cdbb31..91e489ee 100644 --- a/12.0/apache/Dockerfile +++ b/12.0/apache/Dockerfile @@ -8,6 +8,7 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ + echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ # 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/Dockerfile b/12.0/fpm/Dockerfile index 7e45d565..6835f707 100644 --- a/12.0/fpm/Dockerfile +++ b/12.0/fpm/Dockerfile @@ -8,6 +8,7 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ + echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html \ diff --git a/Dockerfile.template b/Dockerfile.template index 1d9bf3ac..57722d80 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -8,6 +8,7 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ + echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ # install the PHP extensions we need # see https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html \ From 3747025dd6cc24b4454feecd897328d9d6a8ce6e Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Tue, 30 Jan 2018 13:11:04 +0100 Subject: [PATCH 3/6] Add cron.sh --- 11.0/apache/Dockerfile | 2 +- 11.0/apache/cron.sh | 6 ++++++ 11.0/apache/{docker-entrypoint.sh => entrypoint.sh} | 0 11.0/fpm/Dockerfile | 2 +- 11.0/fpm/cron.sh | 6 ++++++ 11.0/fpm/{docker-entrypoint.sh => entrypoint.sh} | 0 12.0/apache/Dockerfile | 2 +- 12.0/apache/cron.sh | 6 ++++++ 12.0/apache/{docker-entrypoint.sh => entrypoint.sh} | 0 12.0/fpm/Dockerfile | 2 +- 12.0/fpm/cron.sh | 6 ++++++ 12.0/fpm/{docker-entrypoint.sh => entrypoint.sh} | 0 Dockerfile.template | 2 +- docker-cron.sh | 6 ++++++ update.sh | 6 ++++-- 15 files changed, 39 insertions(+), 7 deletions(-) create mode 100755 11.0/apache/cron.sh rename 11.0/apache/{docker-entrypoint.sh => entrypoint.sh} (100%) create mode 100755 11.0/fpm/cron.sh rename 11.0/fpm/{docker-entrypoint.sh => entrypoint.sh} (100%) create mode 100755 12.0/apache/cron.sh rename 12.0/apache/{docker-entrypoint.sh => entrypoint.sh} (100%) create mode 100755 12.0/fpm/cron.sh rename 12.0/fpm/{docker-entrypoint.sh => entrypoint.sh} (100%) create mode 100755 docker-cron.sh diff --git a/11.0/apache/Dockerfile b/11.0/apache/Dockerfile index 9a33b28a..eb4a99c8 100644 --- a/11.0/apache/Dockerfile +++ b/11.0/apache/Dockerfile @@ -88,7 +88,7 @@ RUN set -ex; \ mkdir -p /usr/src/nextcloud/custom_apps; \ chmod +x /usr/src/nextcloud/occ -COPY docker-entrypoint.sh /entrypoint.sh +COPY *.sh / COPY config/* /usr/src/nextcloud/config/ ENTRYPOINT ["/entrypoint.sh"] diff --git a/11.0/apache/cron.sh b/11.0/apache/cron.sh new file mode 100755 index 00000000..d5f59e8d --- /dev/null +++ b/11.0/apache/cron.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +mkdir -p /var/spool/cron/crontabs + +exec busybox crond -f -l 0 -L /dev/stdout diff --git a/11.0/apache/docker-entrypoint.sh b/11.0/apache/entrypoint.sh similarity index 100% rename from 11.0/apache/docker-entrypoint.sh rename to 11.0/apache/entrypoint.sh diff --git a/11.0/fpm/Dockerfile b/11.0/fpm/Dockerfile index 32e4849a..705731c9 100644 --- a/11.0/fpm/Dockerfile +++ b/11.0/fpm/Dockerfile @@ -87,7 +87,7 @@ RUN set -ex; \ mkdir -p /usr/src/nextcloud/custom_apps; \ chmod +x /usr/src/nextcloud/occ -COPY docker-entrypoint.sh /entrypoint.sh +COPY *.sh / COPY config/* /usr/src/nextcloud/config/ ENTRYPOINT ["/entrypoint.sh"] diff --git a/11.0/fpm/cron.sh b/11.0/fpm/cron.sh new file mode 100755 index 00000000..d5f59e8d --- /dev/null +++ b/11.0/fpm/cron.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +mkdir -p /var/spool/cron/crontabs + +exec busybox crond -f -l 0 -L /dev/stdout diff --git a/11.0/fpm/docker-entrypoint.sh b/11.0/fpm/entrypoint.sh similarity index 100% rename from 11.0/fpm/docker-entrypoint.sh rename to 11.0/fpm/entrypoint.sh diff --git a/12.0/apache/Dockerfile b/12.0/apache/Dockerfile index 91e489ee..4e81de32 100644 --- a/12.0/apache/Dockerfile +++ b/12.0/apache/Dockerfile @@ -88,7 +88,7 @@ RUN set -ex; \ mkdir -p /usr/src/nextcloud/custom_apps; \ chmod +x /usr/src/nextcloud/occ -COPY docker-entrypoint.sh /entrypoint.sh +COPY *.sh / COPY config/* /usr/src/nextcloud/config/ ENTRYPOINT ["/entrypoint.sh"] diff --git a/12.0/apache/cron.sh b/12.0/apache/cron.sh new file mode 100755 index 00000000..d5f59e8d --- /dev/null +++ b/12.0/apache/cron.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +mkdir -p /var/spool/cron/crontabs + +exec busybox crond -f -l 0 -L /dev/stdout diff --git a/12.0/apache/docker-entrypoint.sh b/12.0/apache/entrypoint.sh similarity index 100% rename from 12.0/apache/docker-entrypoint.sh rename to 12.0/apache/entrypoint.sh diff --git a/12.0/fpm/Dockerfile b/12.0/fpm/Dockerfile index 6835f707..8a4555a8 100644 --- a/12.0/fpm/Dockerfile +++ b/12.0/fpm/Dockerfile @@ -87,7 +87,7 @@ RUN set -ex; \ mkdir -p /usr/src/nextcloud/custom_apps; \ chmod +x /usr/src/nextcloud/occ -COPY docker-entrypoint.sh /entrypoint.sh +COPY *.sh / COPY config/* /usr/src/nextcloud/config/ ENTRYPOINT ["/entrypoint.sh"] diff --git a/12.0/fpm/cron.sh b/12.0/fpm/cron.sh new file mode 100755 index 00000000..d5f59e8d --- /dev/null +++ b/12.0/fpm/cron.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +mkdir -p /var/spool/cron/crontabs + +exec busybox crond -f -l 0 -L /dev/stdout diff --git a/12.0/fpm/docker-entrypoint.sh b/12.0/fpm/entrypoint.sh similarity index 100% rename from 12.0/fpm/docker-entrypoint.sh rename to 12.0/fpm/entrypoint.sh diff --git a/Dockerfile.template b/Dockerfile.template index 57722d80..1675cd40 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -87,7 +87,7 @@ RUN set -ex; \ mkdir -p /usr/src/nextcloud/custom_apps; \ chmod +x /usr/src/nextcloud/occ -COPY docker-entrypoint.sh /entrypoint.sh +COPY *.sh / COPY config/* /usr/src/nextcloud/config/ ENTRYPOINT ["/entrypoint.sh"] diff --git a/docker-cron.sh b/docker-cron.sh new file mode 100755 index 00000000..d5f59e8d --- /dev/null +++ b/docker-cron.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e + +mkdir -p /var/spool/cron/crontabs + +exec busybox crond -f -l 0 -L /dev/stdout diff --git a/update.sh b/update.sh index 2920d073..2fb6f4c0 100755 --- a/update.sh +++ b/update.sh @@ -51,8 +51,10 @@ for latest in "${latests[@]}"; do s/%%VARIANT_EXTRAS%%/'"${extras[$variant]}"'/g; ' "$version/$variant/Dockerfile" - # Copy the docker-entrypoint. - cp docker-entrypoint.sh "$version/$variant/docker-entrypoint.sh" + # Copy the shell scripts + for name in entrypoint cron; do + cp "docker-$name.sh" "$version/$variant/$name.sh" + done # Copy the config directory cp -rT .config "$version/$variant/config" From 2e3645f8536a969da8f4e18f9fd312ab9b2fd439 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Tue, 30 Jan 2018 13:16:40 +0100 Subject: [PATCH 4/6] Use cron.sh for the example docker-compose.yml's --- .../mariadb-cron-redis/apache/docker-compose.yml | 15 +-------------- .../mariadb-cron-redis/fpm/docker-compose.yml | 15 +-------------- .../mariadb-cron-redis/apache/docker-compose.yml | 15 +-------------- .../mariadb-cron-redis/fpm/docker-compose.yml | 15 +-------------- 4 files changed, 4 insertions(+), 56 deletions(-) diff --git a/.examples/docker-compose/insecure/mariadb-cron-redis/apache/docker-compose.yml b/.examples/docker-compose/insecure/mariadb-cron-redis/apache/docker-compose.yml index 87760d6b..ab307200 100644 --- a/.examples/docker-compose/insecure/mariadb-cron-redis/apache/docker-compose.yml +++ b/.examples/docker-compose/insecure/mariadb-cron-redis/apache/docker-compose.yml @@ -36,20 +36,7 @@ services: restart: always volumes: - nextcloud:/var/www/html - user: www-data - entrypoint: | - bash -c 'bash -s < Date: Tue, 30 Jan 2018 13:40:15 +0100 Subject: [PATCH 5/6] Use cron.sh in the example dockerfiles --- .examples/README.md | 3 +-- .examples/dockerfiles/cron/apache/Dockerfile | 9 +++------ .examples/dockerfiles/cron/apache/supervisord.conf | 2 +- .examples/dockerfiles/cron/fpm/Dockerfile | 9 +++------ .examples/dockerfiles/cron/fpm/supervisord.conf | 2 +- .examples/dockerfiles/full/apache/Dockerfile | 4 +--- .examples/dockerfiles/full/apache/supervisord.conf | 2 +- .examples/dockerfiles/full/fpm/Dockerfile | 4 +--- .examples/dockerfiles/full/fpm/supervisord.conf | 2 +- 9 files changed, 13 insertions(+), 24 deletions(-) diff --git a/.examples/README.md b/.examples/README.md index 0b381ee5..c9843b4b 100644 --- a/.examples/README.md +++ b/.examples/README.md @@ -59,9 +59,8 @@ The required steps for each optional/recommended package that is not already in `apt install LibreOffice`
#### CRON via supervisor -`apt install supervisor cron`
+`apt install supervisor`
`mkdir /var/log/supervisord /var/run/supervisord`
-`echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab -`
The following Dockerfile commands are also necessary for a sucessfull cron installation:
`COPY supervisord.conf /etc/supervisor/supervisord.conf`
`CMD ["/usr/bin/supervisord"]`
diff --git a/.examples/dockerfiles/cron/apache/Dockerfile b/.examples/dockerfiles/cron/apache/Dockerfile index dd4939a8..2a6f3e73 100644 --- a/.examples/dockerfiles/cron/apache/Dockerfile +++ b/.examples/dockerfiles/cron/apache/Dockerfile @@ -1,12 +1,9 @@ FROM nextcloud:apache RUN apt-get update && apt-get install -y \ - supervisor \ - cron \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir /var/log/supervisord /var/run/supervisord && \ - echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab - + supervisor \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir /var/log/supervisord /var/run/supervisord COPY supervisord.conf /etc/supervisor/supervisord.conf diff --git a/.examples/dockerfiles/cron/apache/supervisord.conf b/.examples/dockerfiles/cron/apache/supervisord.conf index 25ae32f8..836a08ad 100644 --- a/.examples/dockerfiles/cron/apache/supervisord.conf +++ b/.examples/dockerfiles/cron/apache/supervisord.conf @@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=cron -f +command=/cron.sh diff --git a/.examples/dockerfiles/cron/fpm/Dockerfile b/.examples/dockerfiles/cron/fpm/Dockerfile index b93eed1b..1e4b4025 100644 --- a/.examples/dockerfiles/cron/fpm/Dockerfile +++ b/.examples/dockerfiles/cron/fpm/Dockerfile @@ -1,12 +1,9 @@ FROM nextcloud:fpm RUN apt-get update && apt-get install -y \ - supervisor \ - cron \ - && rm -rf /var/lib/apt/lists/* - -RUN mkdir /var/log/supervisord /var/run/supervisord && \ - echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab - + supervisor \ + && rm -rf /var/lib/apt/lists/* \ + && mkdir /var/log/supervisord /var/run/supervisord COPY supervisord.conf /etc/supervisor/supervisord.conf diff --git a/.examples/dockerfiles/cron/fpm/supervisord.conf b/.examples/dockerfiles/cron/fpm/supervisord.conf index ff27295f..4f762592 100644 --- a/.examples/dockerfiles/cron/fpm/supervisord.conf +++ b/.examples/dockerfiles/cron/fpm/supervisord.conf @@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=cron -f +command=/cron.sh diff --git a/.examples/dockerfiles/full/apache/Dockerfile b/.examples/dockerfiles/full/apache/Dockerfile index 8a7c65da..31229792 100644 --- a/.examples/dockerfiles/full/apache/Dockerfile +++ b/.examples/dockerfiles/full/apache/Dockerfile @@ -3,7 +3,6 @@ FROM nextcloud:apache RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ && apt-get update && apt-get install -y \ supervisor \ - cron \ ffmpeg \ libmagickwand-dev \ libgmp3-dev \ @@ -18,8 +17,7 @@ RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/so && docker-php-ext-install bz2 gmp imap \ && pecl install imagick smbclient \ && docker-php-ext-enable imagick smbclient \ - && mkdir /var/log/supervisord /var/run/supervisord \ - && echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab - + && mkdir /var/log/supervisord /var/run/supervisord COPY supervisord.conf /etc/supervisor/supervisord.conf diff --git a/.examples/dockerfiles/full/apache/supervisord.conf b/.examples/dockerfiles/full/apache/supervisord.conf index 25ae32f8..836a08ad 100644 --- a/.examples/dockerfiles/full/apache/supervisord.conf +++ b/.examples/dockerfiles/full/apache/supervisord.conf @@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=cron -f +command=/cron.sh diff --git a/.examples/dockerfiles/full/fpm/Dockerfile b/.examples/dockerfiles/full/fpm/Dockerfile index af37cd53..4798db42 100644 --- a/.examples/dockerfiles/full/fpm/Dockerfile +++ b/.examples/dockerfiles/full/fpm/Dockerfile @@ -3,7 +3,6 @@ FROM nextcloud:fpm RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list \ && apt-get update && apt-get install -y \ supervisor \ - cron \ ffmpeg \ libmagickwand-dev \ libgmp3-dev \ @@ -18,8 +17,7 @@ RUN echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/so && docker-php-ext-install bz2 gmp imap \ && pecl install imagick smbclient \ && docker-php-ext-enable imagick smbclient \ - && mkdir /var/log/supervisord /var/run/supervisord \ - && echo "*/15 * * * * su - www-data -s /bin/bash -c \"php -f /var/www/html/cron.php\""| crontab - + && mkdir /var/log/supervisord /var/run/supervisord COPY supervisord.conf /etc/supervisor/supervisord.conf diff --git a/.examples/dockerfiles/full/fpm/supervisord.conf b/.examples/dockerfiles/full/fpm/supervisord.conf index ff27295f..4f762592 100644 --- a/.examples/dockerfiles/full/fpm/supervisord.conf +++ b/.examples/dockerfiles/full/fpm/supervisord.conf @@ -19,4 +19,4 @@ stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -command=cron -f +command=/cron.sh From 423e017e3b6c76a5e361746a86a3a7789693044d Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Tue, 30 Jan 2018 17:49:10 +0100 Subject: [PATCH 6/6] Fix cron config --- 11.0/apache/Dockerfile | 3 ++- 11.0/apache/cron.sh | 2 -- 11.0/fpm/Dockerfile | 3 ++- 11.0/fpm/cron.sh | 2 -- 12.0/apache/Dockerfile | 3 ++- 12.0/apache/cron.sh | 2 -- 12.0/fpm/Dockerfile | 3 ++- 12.0/fpm/cron.sh | 2 -- Dockerfile.template | 3 ++- docker-cron.sh | 2 -- 10 files changed, 10 insertions(+), 15 deletions(-) diff --git a/11.0/apache/Dockerfile b/11.0/apache/Dockerfile index eb4a99c8..2c42d99f 100644 --- a/11.0/apache/Dockerfile +++ b/11.0/apache/Dockerfile @@ -8,7 +8,8 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ - echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ + 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/11.0/apache/cron.sh b/11.0/apache/cron.sh index d5f59e8d..bb65a1fb 100755 --- a/11.0/apache/cron.sh +++ b/11.0/apache/cron.sh @@ -1,6 +1,4 @@ #!/bin/bash set -e -mkdir -p /var/spool/cron/crontabs - exec busybox crond -f -l 0 -L /dev/stdout diff --git a/11.0/fpm/Dockerfile b/11.0/fpm/Dockerfile index 705731c9..e10bb75d 100644 --- a/11.0/fpm/Dockerfile +++ b/11.0/fpm/Dockerfile @@ -8,7 +8,8 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ - echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ + 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/11.0/fpm/cron.sh b/11.0/fpm/cron.sh index d5f59e8d..bb65a1fb 100755 --- a/11.0/fpm/cron.sh +++ b/11.0/fpm/cron.sh @@ -1,6 +1,4 @@ #!/bin/bash set -e -mkdir -p /var/spool/cron/crontabs - exec busybox crond -f -l 0 -L /dev/stdout diff --git a/12.0/apache/Dockerfile b/12.0/apache/Dockerfile index 4e81de32..4a3e8673 100644 --- a/12.0/apache/Dockerfile +++ b/12.0/apache/Dockerfile @@ -8,7 +8,8 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ - echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ + 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/apache/cron.sh b/12.0/apache/cron.sh index d5f59e8d..bb65a1fb 100755 --- a/12.0/apache/cron.sh +++ b/12.0/apache/cron.sh @@ -1,6 +1,4 @@ #!/bin/bash set -e -mkdir -p /var/spool/cron/crontabs - exec busybox crond -f -l 0 -L /dev/stdout diff --git a/12.0/fpm/Dockerfile b/12.0/fpm/Dockerfile index 8a4555a8..2b6dca09 100644 --- a/12.0/fpm/Dockerfile +++ b/12.0/fpm/Dockerfile @@ -8,7 +8,8 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ - echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ + 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/cron.sh b/12.0/fpm/cron.sh index d5f59e8d..bb65a1fb 100755 --- a/12.0/fpm/cron.sh +++ b/12.0/fpm/cron.sh @@ -1,6 +1,4 @@ #!/bin/bash set -e -mkdir -p /var/spool/cron/crontabs - exec busybox crond -f -l 0 -L /dev/stdout diff --git a/Dockerfile.template b/Dockerfile.template index 1675cd40..dc7b8cb3 100644 --- a/Dockerfile.template +++ b/Dockerfile.template @@ -8,7 +8,8 @@ RUN set -ex; \ bzip2 \ busybox-static \ ; \ - echo '*/15 * * * * www-data php -f /var/www/html/cron.php' > /etc/crontab; \ + 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/docker-cron.sh b/docker-cron.sh index d5f59e8d..bb65a1fb 100755 --- a/docker-cron.sh +++ b/docker-cron.sh @@ -1,6 +1,4 @@ #!/bin/bash set -e -mkdir -p /var/spool/cron/crontabs - exec busybox crond -f -l 0 -L /dev/stdout