Fixed a permission error when Nginx tries to write the error log or to

remove the pid
This commit is contained in:
Tim de Pater 2019-01-27 08:08:54 +01:00
parent 9ef6acf619
commit b2afaef8d4

View File

@ -18,12 +18,10 @@ COPY config/php.ini /etc/php7/conf.d/zzz_custom.ini
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Make sure files/folders needed by the processes are accessable when they run under the nobody user # Make sure files/folders needed by the processes are accessable when they run under the nobody user
RUN touch /run/nginx.pid && \ RUN chown -R nobody.nobody /run && \
touch /run/supervisord.pid && \ chown -R nobody.nobody /var/lib/nginx && \
chown -R nobody.nobody /run/nginx.pid && \
chown -R nobody.nobody /run/supervisord.pid && \
chown -R nobody.nobody /var/tmp/nginx && \ chown -R nobody.nobody /var/tmp/nginx && \
chown -R nobody.nobody /var/lib/nginx/logs chown -R nobody.nobody /var/log/nginx
# Setup document root # Setup document root
RUN mkdir -p /var/www/html RUN mkdir -p /var/www/html