• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1FROM 32bit/debian:jessie
2
3# Install dependencies.  We start with the basic ones require to build protoc
4# and the C++ build
5RUN apt-get update && apt-get install -y \
6  autoconf \
7  autotools-dev \
8  build-essential \
9  bzip2 \
10  ccache \
11  curl \
12  gcc \
13  git \
14  libc6 \
15  libc6-dbg \
16  libc6-dev \
17  libgtest-dev \
18  libtool \
19  make \
20  parallel \
21  time \
22  wget \
23  && apt-get clean
24
25# Install php dependencies
26RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
27  bison \
28  php5 \
29  libcurl4-openssl-dev \
30  libssl-dev \
31  libxml2-dev \
32  unzip \
33  zlib1g-dev \
34  pkg-config \
35  && apt-get clean
36
37# Install other dependencies
38RUN wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz -O /var/local/bison-2.6.4.tar.gz
39RUN cd /var/local \
40  && tar -zxvf bison-2.6.4.tar.gz \
41  && cd /var/local/bison-2.6.4 \
42  && ./configure \
43  && make \
44  && make install
45
46# Install composer
47RUN curl -sS https://getcomposer.org/installer | php
48RUN mv composer.phar /usr/local/bin/composer
49
50# Download php source code
51RUN git clone https://github.com/php/php-src
52
53# php 5.5
54RUN cd php-src \
55  && git checkout PHP-5.5.38 \
56  && ./buildconf --force
57RUN cd php-src \
58  && ./configure \
59  --enable-bcmath \
60  --with-openssl \
61  --with-zlib \
62  --prefix=/usr/local/php-5.5 \
63  && make \
64  && make install \
65  && make clean
66RUN cd php-src \
67  && ./configure \
68  --enable-maintainer-zts \
69  --with-openssl \
70  --with-zlib \
71  --prefix=/usr/local/php-5.5-zts \
72  && make \
73  && make install \
74  && make clean
75
76RUN wget -O phpunit https://phar.phpunit.de/phpunit-4.phar \
77  && chmod +x phpunit \
78  && cp phpunit /usr/local/php-5.5/bin \
79  && mv phpunit /usr/local/php-5.5-zts/bin
80
81# php 5.6
82RUN cd php-src \
83  && git checkout PHP-5.6.39 \
84  && ./buildconf --force
85RUN cd php-src \
86  && ./configure \
87  --enable-bcmath \
88  --with-openssl \
89  --with-zlib \
90  --prefix=/usr/local/php-5.6 \
91  && make \
92  && make install \
93  && make clean
94RUN cd php-src \
95  && ./configure \
96  --enable-maintainer-zts \
97  --with-openssl \
98  --with-zlib \
99  --prefix=/usr/local/php-5.6-zts \
100  && make \
101  && make install \
102  && make clean
103
104RUN wget -O phpunit https://phar.phpunit.de/phpunit-5.phar \
105  && chmod +x phpunit \
106  && cp phpunit /usr/local/php-5.6/bin \
107  && mv phpunit /usr/local/php-5.6-zts/bin
108
109# php 7.0
110RUN cd php-src \
111  && git checkout PHP-7.0.33 \
112  && ./buildconf --force
113RUN cd php-src \
114  && ./configure \
115  --enable-bcmath \
116  --with-openssl \
117  --with-zlib \
118  --prefix=/usr/local/php-7.0 \
119  && make \
120  && make install \
121  && make clean
122RUN cd php-src \
123  && ./configure \
124  --enable-maintainer-zts \
125  --with-openssl \
126  --with-zlib \
127  --prefix=/usr/local/php-7.0-zts \
128  && make \
129  && make install \
130  && make clean
131
132RUN wget -O phpunit https://phar.phpunit.de/phpunit-6.phar \
133  && chmod +x phpunit \
134  && cp phpunit /usr/local/php-7.0/bin \
135  && mv phpunit /usr/local/php-7.0-zts/bin
136
137# php 7.1
138RUN cd php-src \
139  && git checkout PHP-7.1.25 \
140  && ./buildconf --force
141RUN cd php-src \
142  && ./configure \
143  --enable-bcmath \
144  --with-openssl \
145  --with-zlib \
146  --prefix=/usr/local/php-7.1 \
147  && make \
148  && make install \
149  && make clean
150RUN cd php-src \
151  && ./configure \
152  --enable-maintainer-zts \
153  --with-openssl \
154  --with-zlib \
155  --prefix=/usr/local/php-7.1-zts \
156  && make \
157  && make install \
158  && make clean
159
160RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
161  && chmod +x phpunit \
162  && cp phpunit /usr/local/php-7.1/bin \
163  && mv phpunit /usr/local/php-7.1-zts/bin
164
165# php 7.2
166RUN cd php-src \
167  && git checkout PHP-7.2.13 \
168  && ./buildconf --force
169RUN cd php-src \
170  && ./configure \
171  --enable-bcmath \
172  --with-openssl \
173  --with-zlib \
174  --prefix=/usr/local/php-7.2 \
175  && make \
176  && make install \
177  && make clean
178RUN cd php-src \
179  && ./configure \
180  --enable-maintainer-zts \
181  --with-openssl \
182  --with-zlib \
183  --prefix=/usr/local/php-7.2-zts \
184  && make \
185  && make install \
186  && make clean
187
188RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
189  && chmod +x phpunit \
190  && cp phpunit /usr/local/php-7.2/bin \
191  && mv phpunit /usr/local/php-7.2-zts/bin
192
193# php 7.3
194RUN cd php-src \
195  && git checkout PHP-7.3.0 \
196  && ./buildconf --force
197RUN cd php-src \
198  && ./configure \
199  --enable-bcmath \
200  --with-openssl \
201  --with-zlib \
202  --prefix=/usr/local/php-7.3 \
203  && make \
204  && make install \
205  && make clean
206RUN cd php-src \
207  && ./configure \
208  --enable-maintainer-zts \
209  --with-openssl \
210  --with-zlib \
211  --prefix=/usr/local/php-7.3-zts \
212  && make \
213  && make install \
214  && make clean
215
216RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
217  && chmod +x phpunit \
218  && cp phpunit /usr/local/php-7.3/bin \
219  && mv phpunit /usr/local/php-7.3-zts/bin
220
221# Install php dependencies
222RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
223  valgrind \
224  && apt-get clean
225