FROM docker.io/library/php:8-fpm

# Installiere System-Abhängigkeiten
RUN apt-get update && apt-get install -y \
    curl \
    apt-transport-https \
    gnupg \
    && curl -1sLf 'https://dl.cloudsmith.io/public/symfony/stable/setup.deb.sh' | bash \
    && apt-get install -y symfony-cli \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

# Installiere Composer
COPY --from=docker.io/library/composer:2.10.0 /usr/bin/composer /usr/bin/composer

# Arbeitsverzeichnis
WORKDIR /var/www/html

# Benutzer für Nicht-Root-Betrieb (optional, aber empfohlen)
# Wir nutzen hier den Standard www-data User von PHP-FPM
USER www-data

CMD ["php-fpm"]
