-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alpine
58 lines (45 loc) · 1.56 KB
/
Dockerfile.alpine
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM xtremxpert/qemu-static-alpine
MAINTAINER Benoit Vezina a.k.a. XtremXpert "benoit@xtremxpert.com"
ENV REFRESHED_AT 2018-07-01
RUN [ "cross-build-start" ]
# Update the package repository
RUN apk update && \
apk upgrade && \
apk add curl
# Added dotdeb to apt and install PHP
RUN apk add \
php7 \
php7-curl \
php7-dom \
php7-json \
php7-mbstring \
php7-mcrypt \
php7-openssl \
php7-pgsql \
php7-phar \
postgresql-contrib && \
curl -sS https://getcomposer.org/installer | php && \
mv composer.phar /usr/local/bin/composer
RUN ls -la /etc/php7/conf.d && sed -i 's/;include_path = ".:\/usr\/share\/php"/include_path = ".:\/var\/www\/library"/g' /etc/php7/cli/php.ini && \
sed -i 's/\;include_path = ".:\/usr\/share\/php"/include_path = ".:\/var\/www\/library"/g' /etc/php7/apache2/php.ini && \
a2enmod rewrite
# Fix phppgadmin
COPY ./phppgadmin.conf /etc/apache2/conf.d/phppgadmin
COPY ./config.inc.php /usr/share/phppgadmin/conf/config.inc.php
RUN sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/g' /etc/php7/apache2/php.ini
# Set Apache environment variables (can be changed on docker run with -e)
ENV APACHE_RUN_USER www-data
ENV APACHE_RUN_GROUP www-data
ENV APACHE_LOG_DIR /var/log/apache2
ENV APACHE_PID_FILE /var/run/apache2.pid
ENV APACHE_RUN_DIR /var/run/apache2
ENV APACHE_LOCK_DIR /var/lock/apache2
ENV APACHE_SERVERADMIN admin@localhost
ENV APACHE_SERVERNAME localhost
ENV POSTGRES_DEFAULTDB defaultdb
ENV POSTGRES_HOST db
ENV POSTGRES_PORT 5432
EXPOSE 80
COPY start.sh /start.sh
CMD ["bash", "start.sh"]
RUN [ "cross-build-end" ]