FROM php:8.2-apache
RUN apt-get update && \
apt-get install -y libonig-dev libzip-dev
RUN docker-php-ext-install mysqli pdo_mysql mbstring zip
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/local/bin/composer
# Enable Apache headers module
RUN a2enmod headers
# Add custom Apache configuration for UTF-8 charset
COPY apache-charset.conf /etc/apache2/conf-available/charset.conf
RUN a2enconf charset