diff --git a/Dockerfile b/Dockerfile index 02df61b..8e64667 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,17 @@ -FROM php:8.2-apache +FROM php:8.2-apache -# Instal·lar extensions necessàries -RUN docker-php-ext-install mysqli pdo pdo_mysql +RUN apt-get update && apt-get install -y \ + libcurl4-openssl-dev \ + libonig-dev \ + ca-certificates \ + unzip \ + git \ + && docker-php-ext-install curl mbstring mysqli pdo pdo_mysql \ + && a2enmod rewrite \ + && rm -rf /var/lib/apt/lists/* -# Activar mod_rewrite -RUN a2enmod rewrite - -# Copiar projecte COPY . /var/www/html/ -# Permisos -RUN chown -R www-data:www-data /var/www/html \ No newline at end of file +RUN mkdir -p /var/www/html/api/cache \ + && chown -R www-data:www-data /var/www/html \ + && chmod -R 775 /var/www/html/api/cache