FROM php:8.2-fpm

ENV DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8


RUN apt-get update \
    && apt-get install -y libpcre3-dev zlib1g-dev libxml2-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev libmcrypt-dev libzip-dev
RUN groupadd --gid 1001 site \
    && useradd --uid 1001 --gid site --no-create-home --system site
RUN docker-php-ext-install -j$(nproc) mysqli pdo_mysql opcache zip gd
    # && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    # && docker-php-ext-install -j$(nproc) gd
