-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
34 lines (30 loc) · 928 Bytes
/
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
# Prepare environment
FROM php:7.2-apache
RUN a2enmod rewrite
RUN docker-php-ext-install pdo_mysql
RUN docker-php-ext-install bcmath
RUN apt-get update -y && apt-get install -y libpng-dev libgmp-dev
RUN docker-php-ext-install gd
RUN docker-php-ext-install gmp
# copy yii2 files
COPY assets /var/www/assets
COPY commands /var/www/commands
COPY components /var/www/components
COPY config /var/www/config
COPY controllers /var/www/controllers
COPY daemons /var/www/daemons
COPY mail /var/www/mail
COPY logs /var/www/logs
COPY messages /var/www/messages
COPY migrations /var/www/migrations
COPY models /var/www/models
COPY runtime /var/www/runtime
COPY views /var/www/views
COPY widgets /var/www/widgets
COPY vendor /var/www/vendor
#this is the trick
COPY web /var/www/html
COPY requirements.php /var/www/html
COPY yii /var/www
RUN mv /var/www/config/db-docker.php /var/www/config/db.php
RUN chown -R www-data:www-data /var/www