forked from splitbrain/docker-phpfarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (58 loc) · 1.39 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#
# PHP Farm Docker image
#
# we use Debian as the host OS
FROM philcryer/min-wheezy:latest
MAINTAINER Andreas Gohr, [email protected]
# add some build tools
RUN apt-get update && \
apt-get install -y \
apache2 \
apache2-mpm-prefork \
git \
build-essential \
wget \
libxml2-dev \
libssl-dev \
libsslcommon2-dev \
libcurl4-openssl-dev \
pkg-config \
curl \
libapache2-mod-fcgid \
libbz2-dev \
libjpeg-dev \
libpng-dev \
libfreetype6-dev \
libxpm-dev \
libmcrypt-dev \
libt1-dev \
libltdl-dev \
libmhash-dev
# install and run the phpfarm script
RUN git clone https://github.com/cweiske/phpfarm.git phpfarm
# add customized configuration
COPY phpfarm /phpfarm/src/
# compile, then delete sources (saves space)
RUN cd /phpfarm/src && \
./compile.sh 5.2.17 && \
./compile.sh 5.3.29 && \
./compile.sh 5.4.44 && \
./compile.sh 5.5.28 && \
./compile.sh 5.6.12 && \
rm -rf /phpfarm/src && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# reconfigure Apache
RUN rm -rf /var/www/*
COPY var-www /var/www/
COPY apache /etc/apache2/
RUN a2ensite php-5.2 php-5.3 php-5.4 php-5.5 php-5.6
RUN a2enmod rewrite
# set path
ENV PATH /phpfarm/inst/bin/:/usr/sbin:/usr/bin:/sbin:/bin
# expose the ports
EXPOSE 8052 8053 8054 8055 8056
# run it
COPY run.sh /run.sh
ENTRYPOINT ["/bin/bash"]
CMD ["/run.sh"]