Fix #57 - NGINX tmp permission issue & reorganize Dockerfile content

This commit is contained in:
Bubka 2022-05-20 14:37:28 +02:00
parent 3dc4e55efe
commit 990fca3912
2 changed files with 7 additions and 7 deletions

View File

@ -55,12 +55,7 @@ RUN apk add --update --no-cache \
# Runtime dependencies # Runtime dependencies
php7-session php7-json php7-openssl \ php7-session php7-json php7-openssl \
# Nginx and PHP FPM to serve over HTTP # Nginx and PHP FPM to serve over HTTP
php7-fpm nginx \ php7-fpm nginx
&& \
# Clean up
rm /etc/nginx/nginx.conf && \
# Fix ownership to ${UID}:${GID}
chown -R ${UID}:${GID} /var/lib/nginx/
# PHP FPM configuration # PHP FPM configuration
# Change username and ownership in php-fpm pool config # Change username and ownership in php-fpm pool config
@ -73,7 +68,11 @@ RUN mkdir /run/php && \
chown ${UID}:${GID} /run/php /var/log/php7 && \ chown ${UID}:${GID} /run/php /var/log/php7 && \
chmod 700 /run/php /var/log/php7 chmod 700 /run/php /var/log/php7
# Nginx configuration # NGINX
# Clean up
RUN rm /etc/nginx/nginx.conf && \
chown -R ${UID}:${GID} /var/lib/nginx
# configuration
EXPOSE 8000/tcp EXPOSE 8000/tcp
RUN touch /run/nginx/nginx.pid /var/lib/nginx/logs/error.log && \ RUN touch /run/nginx/nginx.pid /var/lib/nginx/logs/error.log && \
chown ${UID}:${GID} /run/nginx/nginx.pid /var/lib/nginx/logs/error.log chown ${UID}:${GID} /run/nginx/nginx.pid /var/lib/nginx/logs/error.log

View File

@ -1,6 +1,7 @@
events {} events {}
http { http {
include mime.types; include mime.types;
client_body_temp_path /tmp 1 2;
access_log /dev/stdout; access_log /dev/stdout;
error_log /dev/stderr; error_log /dev/stderr;