php-legacy/docker/8.3-apache/Dockerfile

39 lines
1.1 KiB
Docker

FROM php:8.3-apache
# Install dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libzip-dev \
zlib1g-dev \
vim \
libicu-dev \
fcgiwrap \
mariadb-client \
ca-certificates \
curl \
git && \
rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-configure intl && \
docker-php-ext-install intl && \
docker-php-ext-configure gd --with-freetype --with-jpeg && \
docker-php-ext-install -j$(nproc) gd && \
docker-php-ext-install mysqli zip pdo_mysql bcmath && \
docker-php-ext-install opcache
# Download Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Create session directory
RUN mkdir /var/www/sessions && \
chmod 777 /var/www/sessions
# Enable Apache mod_rewrite
RUN a2enmod rewrite
# Set max_input_vars in PHP configuration
RUN echo "max_input_vars = 6000" > /usr/local/etc/php/conf.d/max_input_vars.ini