diff --git a/Dockerfile b/Dockerfile index 6f98c58..3966c26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,10 @@ RUN apk add --no-cache \ vim \ shadow +# syslog option '-Z' was changed to '-t', change this in /etc/conf.d/syslog so that syslog (and then cron) actually starts +# https://gitlab.alpinelinux.org/alpine/aports/-/issues/9279 +RUN sed -i 's/SYSLOGD_OPTS="-Z"/SYSLOGD_OPTS="-t"/g' /etc/conf.d/syslog + # Configure to use php fpm and don't use /var/www to store everything (modules and logs) RUN \ # Disable mpm_prefork diff --git a/run.sh b/run.sh index ee3d8d2..bbfbc4f 100644 --- a/run.sh +++ b/run.sh @@ -5,9 +5,10 @@ # Cron requires that each entry in a crontab end in a newline character. If the last entry in a crontab is missing the newline, cron will consider the crontab (at least partially) broken and refuse to install it. (crontab -l; echo "") | crontab - -# Start Apache and PHP-FPM +# Start Apache, PHP-FPM and Cron exec /usr/sbin/httpd -D FOREGROUND -f /etc/apache2/httpd.conf & exec /usr/sbin/php-fpm7 -F +exec crond # Make sure apache can read&right to logs and docroot RUN chown -R apache:apache /var/log/apache2 /var/www \ No newline at end of file