pp-planer/build/Dockerfile
Thorsten Bus 04ef0b08c8 refactor: entrypoint with WWWUSER/WWWGROUP for FPM UID/GID mapping
- Entrypoint remaps www-data to host UID/GID via WWWUSER/WWWGROUP env vars
- Moves composer install, storage setup, migrate into entrypoint
- Removes inline command from docker-compose
- Defaults to 1000:1000, configurable via .env
2026-03-30 22:37:02 +02:00

45 lines
1 KiB
Docker

FROM php:8.4-fpm-alpine
RUN apk add --no-cache \
curl \
git \
zip \
unzip \
libzip-dev \
imagemagick \
libreoffice \
libreoffice-lang-de \
ghostscript \
poppler-utils \
sqlite \
sqlite-dev \
postgresql-client \
mysql-client \
nodejs \
npm \
fcgi
RUN docker-php-ext-install \
pdo_sqlite \
pdo_mysql \
zip \
bcmath
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /app
COPY build/fpm-healthcheck.conf /usr/local/etc/php-fpm.d/zz-healthcheck.conf
COPY build/php-error-logging.conf /usr/local/etc/php-fpm.d/zz-error-logging.conf
COPY build/php-errors.ini /usr/local/etc/php/conf.d/errors.ini
COPY build/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 9000
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
CMD SCRIPT_NAME=/ping SCRIPT_FILENAME=/ping REQUEST_METHOD=GET cgi-fcgi -bind -connect 127.0.0.1:9000 | grep -q pong || exit 1
ENTRYPOINT ["entrypoint.sh"]
CMD ["php-fpm"]