Fix PHP extensions for products API

This commit is contained in:
2026-04-30 20:57:34 +02:00
parent 6ced626af8
commit 3312c99a8a
+13 -9
View File
@@ -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
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