FROM ubuntu:latest ARG TARGETPLATFORM ENV DEBIAN_FRONTEND noninteractive ENV TZ America/Detroit # Used to install all the required software RUN apt update RUN apt install -y apache2 --no-install-recommends RUN apt install -y mariadb-server RUN apt install -y php --no-install-recommends RUN apt install -y php-json php-mysql php-curl php-zip --no-install-recommends RUN apt install -y python3 --no-install-recommends RUN apt install -y python3-pip --no-install-recommends RUN apt install -y python3-requests --no-install-recommends RUN apt install -y curl --no-install-recommends # Clean apt cache RUN apt clean RUN rm -rf /var/lib/apt/lists/* # Clones the website WORKDIR "/var/www/" RUN rm -r html COPY html/ html/ COPY python/ python/ WORKDIR "/var/www/python" RUN pip3 install --break-system-packages -r requirements.txt WORKDIR "/var/www/html" # Gives apache the right settings COPY 000-default.conf /etc/apache2/sites-available/000-default.conf RUN a2enmod rewrite RUN a2ensite 000-default.conf COPY start.sh /start.sh RUN chmod +x /start.sh CMD ["/start.sh"] # Adds a healthcheck HEALTHCHECK --timeout=5s CMD curl --fail http://localhost || exit 1 EXPOSE 80