Made the /var/www/html folder owned by nobody

This commit is contained in:
Tim de Pater 2020-02-02 20:36:51 +01:00
parent 341cc9c6b4
commit 531442435d
No known key found for this signature in database
GPG Key ID: BFE5D809439C9723

View File

@ -19,15 +19,16 @@ COPY config/php.ini /etc/php7/conf.d/custom.ini
# Configure supervisord
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Setup document root
RUN mkdir -p /var/www/html
# Make sure files/folders needed by the processes are accessable when they run under the nobody user
RUN chown -R nobody.nobody /run && \
RUN chown -R nobody.nobody /var/www/html && \
chown -R nobody.nobody /run && \
chown -R nobody.nobody /var/lib/nginx && \
chown -R nobody.nobody /var/tmp/nginx && \
chown -R nobody.nobody /var/log/nginx
# Setup document root
RUN mkdir -p /var/www/html
# Make the document root a volume
VOLUME /var/www/html