| 1 |
sysadm |
1.2 |
# Use an official PHP-FPM image (adjust version as needed)
|
| 2 |
|
|
FROM php:8.4-fpm
|
| 3 |
|
|
|
| 4 |
|
|
# Install PHP extensions
|
| 5 |
|
|
RUN apt-get update && apt-get install -y \
|
| 6 |
|
|
libfreetype-dev libjpeg62-turbo-dev libpng-dev \
|
| 7 |
|
|
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
|
| 8 |
|
|
&& docker-php-ext-install -j$(nproc) gd mysqli \
|
| 9 |
|
|
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
|
|
| 11 |
|
|
# Copy the custom configuration file
|
| 12 |
|
|
COPY ./leafok_bbs/Dockerfile/php.ini /usr/local/etc/php/php.ini
|
| 13 |
|
|
|
| 14 |
|
|
# Set ownership to www-data user and group
|
| 15 |
|
|
RUN mkdir -p /var/lib/php/sessions \
|
| 16 |
|
|
&& chown -R www-data:www-data /var/lib/php/sessions
|