Skip to content

Commit b2afaef

Browse files
committed
Fixed a permission error when Nginx tries to write the error log or to
remove the pid
1 parent 9ef6acf commit b2afaef

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Dockerfile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ COPY config/php.ini /etc/php7/conf.d/zzz_custom.ini
1818
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
1919

2020
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
21-
RUN touch /run/nginx.pid && \
22-
touch /run/supervisord.pid && \
23-
chown -R nobody.nobody /run/nginx.pid && \
24-
chown -R nobody.nobody /run/supervisord.pid && \
21+
RUN chown -R nobody.nobody /run && \
22+
chown -R nobody.nobody /var/lib/nginx && \
2523
chown -R nobody.nobody /var/tmp/nginx && \
26-
chown -R nobody.nobody /var/lib/nginx/logs
24+
chown -R nobody.nobody /var/log/nginx
2725

2826
# Setup document root
2927
RUN mkdir -p /var/www/html

0 commit comments

Comments
 (0)