• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1FROM 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  re2c \
24  sqlite3 \
25  libsqlite3-dev \
26  && apt-get clean
27
28# Install php dependencies
29RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
30  php5 \
31  libcurl4-openssl-dev \
32  libgmp-dev \
33  libgmp3-dev \
34  libssl-dev \
35  libxml2-dev \
36  unzip \
37  zlib1g-dev \
38  pkg-config \
39  && apt-get clean
40
41# Install other dependencies
42RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
43RUN wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz -O /var/local/bison-2.6.4.tar.gz
44RUN cd /var/local \
45  && tar -zxvf bison-2.6.4.tar.gz \
46  && cd /var/local/bison-2.6.4 \
47  && ./configure \
48  && make \
49  && make install
50
51# Install composer
52RUN curl -sS https://getcomposer.org/installer | php
53RUN mv composer.phar /usr/local/bin/composer
54
55# Download php source code
56RUN git clone https://github.com/php/php-src
57
58# php 5.5
59RUN cd php-src \
60  && git checkout PHP-5.5.38 \
61  && ./buildconf --force
62RUN cd php-src \
63  && ./configure \
64  --enable-bcmath \
65  --with-gmp \
66  --with-openssl \
67  --with-zlib \
68  --prefix=/usr/local/php-5.5 \
69  && make \
70  && make install \
71  && make clean
72RUN cd php-src \
73  && ./configure \
74  --enable-maintainer-zts \
75  --with-gmp \
76  --with-openssl \
77  --with-zlib \
78  --prefix=/usr/local/php-5.5-zts \
79  && make \
80  && make install \
81  && make clean
82
83RUN wget -O phpunit https://phar.phpunit.de/phpunit-4.phar \
84  && chmod +x phpunit \
85  && cp phpunit /usr/local/php-5.5/bin \
86  && mv phpunit /usr/local/php-5.5-zts/bin
87
88# php 5.6
89RUN cd php-src \
90  && git checkout PHP-5.6.39 \
91  && ./buildconf --force
92RUN cd php-src \
93  && ./configure \
94  --enable-bcmath \
95  --with-gmp \
96  --with-openssl \
97  --with-zlib \
98  --prefix=/usr/local/php-5.6 \
99  && make \
100  && make install \
101  && make clean
102RUN cd php-src \
103  && ./configure \
104  --enable-maintainer-zts \
105  --with-gmp \
106  --with-openssl \
107  --with-zlib \
108  --prefix=/usr/local/php-5.6-zts \
109  && make \
110  && make install \
111  && make clean
112
113RUN wget -O phpunit https://phar.phpunit.de/phpunit-5.phar \
114  && chmod +x phpunit \
115  && cp phpunit /usr/local/php-5.6/bin \
116  && mv phpunit /usr/local/php-5.6-zts/bin
117
118# php 7.0
119RUN cd php-src \
120  && git checkout PHP-7.0.33 \
121  && ./buildconf --force
122RUN cd php-src \
123  && ./configure \
124  --enable-bcmath \
125  --with-gmp \
126  --with-openssl \
127  --with-zlib \
128  --prefix=/usr/local/php-7.0 \
129  && make \
130  && make install \
131  && make clean
132RUN cd php-src \
133  && ./configure \
134  --enable-maintainer-zts \
135  --with-gmp \
136  --with-openssl \
137  --with-zlib \
138  --prefix=/usr/local/php-7.0-zts \
139  && make \
140  && make install \
141  && make clean
142
143RUN wget -O phpunit https://phar.phpunit.de/phpunit-6.phar \
144  && chmod +x phpunit \
145  && cp phpunit /usr/local/php-7.0/bin \
146  && mv phpunit /usr/local/php-7.0-zts/bin
147
148# php 7.1
149RUN cd php-src \
150  && git checkout PHP-7.1.25 \
151  && ./buildconf --force
152RUN cd php-src \
153  && ./configure \
154  --enable-bcmath \
155  --with-gmp \
156  --with-openssl \
157  --with-zlib \
158  --prefix=/usr/local/php-7.1 \
159  && make \
160  && make install \
161  && make clean
162RUN cd php-src \
163  && ./configure \
164  --enable-maintainer-zts \
165  --with-gmp \
166  --with-openssl \
167  --with-zlib \
168  --prefix=/usr/local/php-7.1-zts \
169  && make \
170  && make install \
171  && make clean
172
173RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
174  && chmod +x phpunit \
175  && cp phpunit /usr/local/php-7.1/bin \
176  && mv phpunit /usr/local/php-7.1-zts/bin
177
178# php 7.2
179RUN cd php-src \
180  && git checkout PHP-7.2.13 \
181  && ./buildconf --force
182RUN cd php-src \
183  && ./configure \
184  --enable-bcmath \
185  --with-gmp \
186  --with-openssl \
187  --with-zlib \
188  --prefix=/usr/local/php-7.2 \
189  && make \
190  && make install \
191  && make clean
192RUN cd php-src \
193  && ./configure \
194  --enable-maintainer-zts \
195  --with-gmp \
196  --with-openssl \
197  --with-zlib \
198  --prefix=/usr/local/php-7.2-zts \
199  && make \
200  && make install \
201  && make clean
202
203RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
204  && chmod +x phpunit \
205  && cp phpunit /usr/local/php-7.2/bin \
206  && mv phpunit /usr/local/php-7.2-zts/bin
207
208# php 7.3
209RUN cd php-src \
210  && git checkout PHP-7.3.0 \
211  && ./buildconf --force
212RUN cd php-src \
213  && ./configure \
214  --enable-bcmath \
215  --with-gmp \
216  --with-openssl \
217  --with-zlib \
218  --prefix=/usr/local/php-7.3 \
219  && make \
220  && make install \
221  && make clean
222RUN cd php-src \
223  && ./configure \
224  --enable-maintainer-zts \
225  --with-gmp \
226  --with-openssl \
227  --with-zlib \
228  --prefix=/usr/local/php-7.3-zts \
229  && make \
230  && make install \
231  && make clean
232
233RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
234  && chmod +x phpunit \
235  && cp phpunit /usr/local/php-7.3/bin \
236  && mv phpunit /usr/local/php-7.3-zts/bin
237
238# php 7.4
239RUN wget https://ftp.gnu.org/gnu/bison/bison-3.0.1.tar.gz -O /var/local/bison-3.0.1.tar.gz
240RUN cd /var/local \
241  && tar -zxvf bison-3.0.1.tar.gz \
242  && cd /var/local/bison-3.0.1 \
243  && ./configure \
244  && make \
245  && make install
246
247RUN wget https://github.com/php/php-src/archive/php-7.4.0.tar.gz -O /var/local/php-7.4.0.tar.gz
248
249RUN cd /var/local \
250  && tar -zxvf php-7.4.0.tar.gz
251
252RUN cd /var/local/php-src-php-7.4.0 \
253  && ./buildconf --force \
254  && ./configure \
255  --enable-bcmath \
256  --with-gmp \
257  --with-openssl \
258  --with-zlib \
259  --prefix=/usr/local/php-7.4 \
260  && make \
261  && make install \
262  && make clean
263RUN cd /var/local/php-src-php-7.4.0 \
264  && ./buildconf --force \
265  && ./configure \
266  --enable-maintainer-zts \
267  --with-gmp \
268  --with-openssl \
269  --with-zlib \
270  --prefix=/usr/local/php-7.4-zts \
271  && make \
272  && make install \
273  && make clean
274
275RUN wget -O phpunit https://phar.phpunit.de/phpunit-8.phar \
276  && chmod +x phpunit \
277  && cp phpunit /usr/local/php-7.4/bin \
278  && mv phpunit /usr/local/php-7.4-zts/bin
279
280# Install php dependencies
281RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
282  valgrind \
283  && apt-get clean
284