From fba4bf571a98946957f3c4bf6603e72817234543 Mon Sep 17 00:00:00 2001 From: atuy Date: Sat, 27 Jun 2026 06:28:46 +0000 Subject: [PATCH] Update Dockerfile --- Dockerfile | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/Dockerfile b/Dockerfile index e69de29..fcb5135 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM php:7.4-apache + +RUN apt-get update && apt-get install -y \ + libpng-dev \ + libjpeg-dev \ + libfreetype6-dev \ + libzip-dev \ + libonig-dev \ + zip \ + unzip \ + && docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install mysqli pdo pdo_mysql mbstring gd zip \ + && a2enmod rewrite headers + +RUN sed -i '//,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf + +RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf + +WORKDIR /var/www/html + +COPY . /var/www/html + +RUN chown -R www-data:www-data /var/www/html \ + && chmod -R 755 /var/www/html \ + && chmod -R 775 /var/www/html/uploads || true \ + && chmod -R 775 /var/www/html/application/cache || true \ + && chmod -R 775 /var/www/html/application/logs || true + +EXPOSE 80 \ No newline at end of file