FROM nginx:alpine-slim # Add a minimal, secure nginx config that works with the php-fpm service COPY nginx.conf /etc/nginx/conf.d/default.conf # Create directories for logs and ensure permissions (nginx user is nginx) RUN mkdir -p /var/www/html /var/log/nginx && chown -R nginx:nginx /var/www/html /var/log/nginx EXPOSE 80 CMD ["nginx", "-g", "daemon off;"]