From 3312c99a8a20c6096e913a5d64860d4eeb2837bf Mon Sep 17 00:00:00 2001 From: Albert Date: Thu, 30 Apr 2026 20:57:34 +0200 Subject: [PATCH] Fix PHP extensions for products API --- Dockerfile | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) 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