FROM php:8.3-fpm

ARG PUID=1000
ARG PGID=1000

RUN apt-get update \
    && apt-get install -y --no-install-recommends ca-certificates git openssh-client \
    && rm -rf /var/lib/apt/lists/*

RUN groupmod -o -g "${PGID}" www-data \
    && usermod -o -u "${PUID}" -g www-data www-data

RUN { \
        echo 'upload_max_filesize = 16M'; \
        echo 'post_max_size = 20M'; \
    } > /usr/local/etc/php/conf.d/uploads.ini

RUN docker-php-ext-install pdo pdo_mysql