53 lines
1.1 KiB
Docker

FROM php:8.4-fpm
ARG user
ARG uid
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
zip \
unzip \
sqlite3 \
libpng-dev \
libjpeg-dev \
libzip-dev \
libonig-dev \
libxml2-dev \
libsqlite3-dev \
libfreetype6-dev \
libonig-dev \
libicu-dev \
build-essential \
openssl
# Install PHP extensions
RUN docker-php-ext-configure gd --enable-gd --with-freetype --with-jpeg
RUN docker-php-ext-install gd \
pdo \
pdo_sqlite \
mbstring \
zip \
exif \
bcmath \
intl \
fileinfo
# Install Node.js (LTS version) and npm
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y nodejs
# Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
# Get latest Composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin --filename=composer
# Fix PHP post and upload size
RUN echo "upload_max_filesize=10M" > /usr/local/etc/php/conf.d/uploads.ini && \
echo "post_max_size=50M" >> /usr/local/etc/php/conf.d/uploads.ini
WORKDIR /var/www