FROM registry.gitlab.com/dxcker/apache-php:latest # Switch over to root user USER root RUN apt update \ && apt -y install unzip git curl \ && apt -y install php-xml php-mbstring php-curl php-pdo php-mysql \ && apt autoclean # Enable mod_rewrite and mod_headers. Should be upstream but hey. RUN a2enmod rewrite headers # Reconfigure apache for this project RUN echo "DocumentRoot /var/www/public" >> /etc/apache2/apache2.conf RUN sed -i 's/\/var\/www\/html/\/var\/www\/public/g' /etc/apache2/apache2.conf # Install Composer COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Copy over entrypoint COPY docker/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh # Copy over files WORKDIR /var/www/ RUN mkdir -p data/files data && chown -R app:app data COPY src/ . RUN chown -R app:app /var/www/ USER app ENTRYPOINT ["/entrypoint.sh"]