| 1 |
# Use an official PHP-FPM image (adjust version as needed) |
# Use an official PHP-FPM image (adjust version as needed) |
| 2 |
FROM php:8.4-fpm |
FROM php:8.4-fpm |
| 3 |
|
|
| 4 |
# Example: Install common PHP extensions |
# Install PHP extensions |
| 5 |
RUN apt-get update && apt-get install -y \ |
RUN apt-get update && apt-get install -y \ |
| 6 |
libfreetype-dev libjpeg62-turbo-dev libpng-dev libxml2-dev \ |
libfreetype-dev libjpeg62-turbo-dev libpng-dev \ |
| 7 |
|
libcurl4-openssl-dev libxml2-dev \ |
| 8 |
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ |
&& docker-php-ext-configure gd --with-freetype --with-jpeg \ |
| 9 |
&& docker-php-ext-install -j$(nproc) gd mysqli |
&& docker-php-ext-install -j$(nproc) gd mysqli \ |
| 10 |
|
&& rm -rf /var/lib/apt/lists/* |
| 11 |
|
|
| 12 |
# Copy the custom configuration file |
# Copy the custom configuration file |
| 13 |
COPY ./Dockerfile/php.ini /usr/local/etc/php/php.ini |
COPY ./Dockerfile/php.ini /usr/local/etc/php/php.ini |
| 16 |
RUN mkdir -p /var/lib/php/sessions \ |
RUN mkdir -p /var/lib/php/sessions \ |
| 17 |
&& chown -R www-data:www-data /var/lib/php/sessions |
&& chown -R www-data:www-data /var/lib/php/sessions |
| 18 |
|
|
| 19 |
# Install PEAR Mail package |
# Install the solr extension via PECL |
| 20 |
RUN pear install -a Mail |
RUN pecl install solr \ |
| 21 |
|
&& docker-php-ext-enable solr |