FROM php:apache RUN apt-get update RUN apt-get install -y libzip-dev RUN docker-php-ext-install zip WORKDIR /var/www/html COPY public/ public COPY src/ src COPY app.php app.php COPY README.md README.md COPY composer.json composer.json COPY composer.lock composer.lock # Application COPY --from=composer:2 /usr/bin/composer /usr/bin/composer RUN composer install --no-dev # Apache COPY docker/vhost.conf /etc/apache2/sites-available/project.conf RUN a2enmod rewrite &&\ a2dissite 000-default &&\ a2ensite project &&\ service apache2 restart EXPOSE 80 ENTRYPOINT ["bash", "-c", "apache2-foreground & php app.php"]