diff --git a/htlm/Dockerfile b/htlm/Dockerfile index 7a0685f..f1b8686 100644 --- a/htlm/Dockerfile +++ b/htlm/Dockerfile @@ -10,12 +10,14 @@ COPY nginx.conf /etc/nginx/conf.d/neon-vortex.conf # Copy application files COPY . /usr/share/nginx/html/ -# Create a non-root user for nginx +# Create a non-root user for nginx and setup writable directories RUN chown -R nginx:nginx /usr/share/nginx/html && \ chown -R nginx:nginx /var/cache/nginx && \ chown -R nginx:nginx /var/log/nginx && \ - touch /var/run/nginx.pid && \ - chown -R nginx:nginx /var/run/nginx.pid + mkdir -p /run && \ + touch /run/nginx.pid && \ + chown -R nginx:nginx /run/nginx.pid && \ + chmod 755 /run # Switch to non-root user USER nginx