-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile-dev
39 lines (33 loc) · 1.16 KB
/
Dockerfile-dev
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
#
# Use this dockerfile to run apigility in dev mode.
#
# Start the dev server using docker-compose:
#
# docker-compose build
# docker-compose up
#
# OR use plain old docker
#
# docker build -f Dockerfile-dev -t apigility-dev .
# docker run -it -p "8080:80" -v $PWD:/var/www apigility-dev
#
FROM php:5.6-apache
RUN apt-get update \
&& apt-get install git zlib1g-dev nano -y --no-install-recommends \
&& rm -r /var/lib/apt/lists/* \
&& docker-php-ext-install zip \
&& curl -sS https://getcomposer.org/installer \
| php -- --install-dir=/usr/local/bin --filename=composer \
&& a2enmod rewrite \
&& sed -i 's!/var/www/html!/var/www/public!g' /etc/apache2/apache2.conf \
&& echo "AllowEncodedSlashes On" >> /etc/apache2/apache2.conf \
&& mv /var/www/html /var/www/public \
&& cp /usr/src/php/php.ini-production /usr/local/etc/php/php.ini \
&& printf '[Date]\ndate.timezone=UTC' > /usr/local/etc/php/conf.d/timezone.ini
WORKDIR /var/www
### END OF Dockerfile copy
VOLUME /var/www
RUN cp /usr/src/php/php.ini-development /usr/local/etc/php/php.ini
CMD composer install \
&& php public/index.php development enable \
&& php -S 0.0.0.0:80 -t public public/index.php