FROM docker.io/composer:latest AS composer COPY composer.json composer.lock ./ RUN composer install FROM docker.io/php:8.0-apache EXPOSE 9367/tcp ENV QUERY_HOST, QUERY_PORT, QUERY_USER_NAME, QUERY_USER_PASSWORD_FILE # copy apache configs RUN rm /etc/apache2/sites-enabled/* \ && a2enmod rewrite COPY docker/ports.conf /etc/apache2/ports.conf COPY docker/site.conf /etc/apache2/sites-enabled/site.conf # copy source files COPY --from=composer /app/vendor ./vendor COPY src ./src USER nobody:nogroup