-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (30 loc) · 1.01 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM php:7.2-apache
LABEL maintainer="[email protected]"
LABEL maintainer="[email protected]"
# build:
# docker build -t gmitirol/resquewebui .
# run:
# docker stop resquewebui && docker run --rm -p 80:80 --name resquewebui gmitirol/resquewebui
EXPOSE 80
WORKDIR "/var/www/project"
# php
RUN set -xe && \
apt-get update && \
apt-get install -y git libmcrypt-dev zip unzip && \
docker-php-ext-install -j$(nproc) pcntl
# apache config
COPY .docker/project.conf /etc/apache2/sites-available
RUN a2dissite 000-default && \
a2ensite project && \
a2enmod rewrite
# source
COPY ./ /var/www/project
RUN set -xe && \
chmod +x bin/console && \
rm -rf .docker && \
rm -f Dockerfile
# composer
RUN set -xe && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer && \
COMPOSER_CACHE_DIR=/dev/null composer install --no-dev --no-progress --optimize-autoloader --no-interaction && \
chown -R www-data:www-data /var/www/project