From 22d7013406792c4d692d50243d15219154ca1367 Mon Sep 17 00:00:00 2001 From: "Quentin McGaw (desktop)" Date: Thu, 29 Jul 2021 18:26:58 -0400 Subject: [PATCH] Fix ownership for php-fpm logs --- Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f75ca176..eac774bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,10 +35,12 @@ RUN apt-get update && \ rm -rf /var/cache/* /var/lib/apt/lists/* RUN echo "www-data ALL = NOPASSWD: /usr/sbin/service php7.3-fpm start, /usr/sbin/service php7.3-fpm status, /usr/sbin/service php7.3-fpm stop" > /etc/sudoers.d/www-data && \ chmod 0440 /etc/sudoers.d/www-data -# Pre-create directories with the correct permissions +# Pre-create files with the correct permissions RUN mkdir /run/php && \ - chown www-data /run/php && \ - chmod 700 /run/php + touch /var/log/php7.3-fpm.log && \ + chown www-data /run/php /var/log/php7.3-fpm.log && \ + chmod 700 /run/php /var/log/php7.3-fpm.log && \ + ln -sf /dev/stdout /var/log/php7.3-fpm.log # NGINX EXPOSE 8000/tcp