FROM php:7.4-apache RUN apt-get update && apt-get install -y \ unzip \ libpng-dev \ libjpeg62-turbo-dev \ libfreetype6-dev \ libzip-dev \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-install -j$(nproc) gd zip \ && a2enmod rewrite headers \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Enable .htaccess files in Apache config RUN sed -i '//,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf WORKDIR /var/www/html COPY pluck-4.74-dev5.zip /tmp/ RUN unzip -q /tmp/pluck-4.74-dev5.zip -d /tmp/ \ && mv /tmp/pluck-4.74-dev5/* /var/www/html/ \ && rm -rf /tmp/pluck-4.74-dev5 /tmp/pluck-4.74-dev5.zip # Directories: 755, Files: 644, Data/Images: 777 (as requested) RUN chown -R www-data:www-data /var/www/html \ && find /var/www/html -type d -exec chmod 755 {} \; \ && find /var/www/html -type f -exec chmod 644 {} \; \ && chmod -R 777 /var/www/html/data /var/www/html/images EXPOSE 80 CMD ["apache2-foreground"]