FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
    apache2 \
    mariadb-server \
    php \
    php-mysql \
    libapache2-mod-php \
    php-gd \
    php-curl \
    php-xml \
    php-mbstring \
    wget \
    ca-certificates \
    unzip \
    ed \
    && apt-get clean

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

WORKDIR /var/www/html
EXPOSE 80

# ServerName global setzen, um die Warnung zu unterdrücken
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf

ENTRYPOINT ["/entrypoint.sh"]
