-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile-php7
43 lines (35 loc) · 1.87 KB
/
Dockerfile-php7
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
39
40
41
42
43
FROM php:7.1-apache
RUN rm /etc/apt/preferences.d/no-debian-php
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get -y install apt-utils && \
DEBIAN_FRONTEND=noninteractive apt-get -y install php-pgsql libpq-dev && \
DEBIAN_FRONTEND=noninteractive apt-get -y install php-mysql mysql-client &&\
DEBIAN_FRONTEND=noninteractive apt-get -y install postgresql-client-common
RUN docker-php-ext-install mysqli pdo pdo_mysql pgsql
#RUN docker-php-ext-configure mysql --with-mysqli=/usr/bin/mysql_config --with-pdo-mysql=/usr
RUN a2enmod rewrite
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_CI_ENV development
EXPOSE 80
COPY . /var/www/html/
COPY websystem/system /var/www/html/system
COPY websystem/index.php /var/www/html/
COPY tests/apache_conf/modules /etc/apache2/conf-enabled/
COPY tests/apache_conf/sites/myemsl-reporting.conf /etc/apache2/sites-available/
RUN ln -s /etc/apache2/sites-available/myemsl-reporting.conf /etc/apache2/sites-enabled/
RUN ln -s /var/www/html/application/resources /var/www/html/project_resources
#RUN cp -f /usr/share/php5/php.ini-development /usr/local/etc/php/php.ini
RUN touch /usr/local/etc/php/conf.d/raw_data.ini \
&& echo "always_populate_raw_post_data = -1;" >> /usr/local/etc/php/conf.d/raw_data.ini
#RUN ln -s /usr/share/php5/pgsql/* /usr/local/etc/php/conf.d/
#RUN ln -s /usr/lib/php5/20131226/p* /usr/local/lib/php/extensions/no-debug-non-zts-20131226/
RUN rm -rf /etc/apache2/sites-enabled/000-default.conf
RUN echo 'date.timezone = America/Los_Angeles' | tee "/usr/local/etc/php/conf.d/timezone.ini"
RUN ["/bin/bash", "-c", "source /etc/apache2/envvars"]
RUN chown -R "$APACHE_RUN_USER:$APACHE_RUN_GROUP" /var/www/html
CMD ["apache2-foreground"]