Fix PHP extensions for products API
This commit is contained in:
+13
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user