46 lines
No EOL
1.1 KiB
Docker
46 lines
No EOL
1.1 KiB
Docker
# Start with PHP 8.3 FPM (FastCGI Process Manager)
|
|
FROM php:8.3-fpm
|
|
|
|
# Update package list and install dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
curl \
|
|
libpng-dev \
|
|
libonig-dev \
|
|
libxml2-dev \
|
|
libzip-dev \
|
|
libicu-dev \
|
|
zip \
|
|
unzip
|
|
|
|
# Clean up to reduce image size
|
|
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install PHP extensions
|
|
# Each one serves specific purpose:
|
|
RUN docker-php-ext-install \
|
|
pdo_mysql \
|
|
mbstring \
|
|
exif \
|
|
pcntl \
|
|
bcmath \
|
|
gd \
|
|
intl \
|
|
zip \
|
|
opcache
|
|
|
|
# Redis for caching/sessions
|
|
RUN pecl install redis && docker-php-ext-enable redis
|
|
|
|
|
|
# Add our PHP config
|
|
COPY ./docker/php/php.ini /usr/local/etc/php/conf.d/custom.ini
|
|
|
|
# Set working directory
|
|
WORKDIR /var/www
|
|
|
|
# What command to run
|
|
CMD ["php-fpm"]
|
|
|
|
# Document that we use port 9000
|
|
EXPOSE 9000 |