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