28 lines
629 B
Docker
28 lines
629 B
Docker
FROM php:apache
|
|
|
|
RUN apt-get update
|
|
RUN apt-get install -y libzip-dev
|
|
RUN docker-php-ext-install zip
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
# Application
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
COPY composer.json composer.json
|
|
COPY composer.lock composer.lock
|
|
RUN composer install --no-dev
|
|
|
|
COPY public/ public
|
|
COPY src/ src
|
|
COPY app.php app.php
|
|
COPY README.md README.md
|
|
|
|
# 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"] |