You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
954 B
35 lines
954 B
FROM php:8.2-fpm-alpine |
|
|
|
# Install system dependencies |
|
RUN apk add --no-cache \ |
|
icu-dev \ |
|
libzip-dev \ |
|
libpng-dev \ |
|
jpeg-dev \ |
|
freetype-dev \ |
|
&& docker-php-ext-install \ |
|
intl \ |
|
pdo_mysql \ |
|
zip \ |
|
gd |
|
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ |
|
&& docker-php-ext-configure pcntl --enable-pcntl \ |
|
&& docker-php-ext-install pcntl |
|
|
|
# Create PHP configuration file |
|
RUN echo "memory_limit = 256M" > /usr/local/etc/php/conf.d/custom.ini \ |
|
&& echo "upload_max_filesize = 100M" >> /usr/local/etc/php/conf.d/custom.ini \ |
|
&& echo "post_max_size = 100M" >> /usr/local/etc/php/conf.d/custom.ini \ |
|
&& echo "max_execution_time = 300" >> /usr/local/etc/php/conf.d/custom.ini |
|
|
|
# Set working directory |
|
WORKDIR /var/www/html |
|
|
|
# Copy application code |
|
COPY --chown=www-data:www-data . . |
|
|
|
# Expose port 9000 for PHP-FPM |
|
EXPOSE 9000 |
|
|
|
# Start PHP-FPM |
|
CMD ["php-fpm"] |