| 1 |
FROM debian:jessie |
| 2 |
|
| 3 |
# Install dependencies. We start with the basic ones require to build protoc |
| 4 |
# and the C++ build |
| 5 |
RUN 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 |
| 29 |
RUN 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 |
| 42 |
RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h |
| 43 |
RUN wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz -O /var/local/bison-2.6.4.tar.gz |
| 44 |
RUN 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 |
| 52 |
RUN curl -sS https://getcomposer.org/installer | php |
| 53 |
RUN mv composer.phar /usr/local/bin/composer |
| 54 |
|
| 55 |
# Download php source code |
| 56 |
RUN git clone https://github.com/php/php-src |
| 57 |
|
| 58 |
# php 5.6 |
| 59 |
RUN cd php-src \ |
| 60 |
&& git checkout PHP-5.6.39 \ |
| 61 |
&& ./buildconf --force |
| 62 |
RUN cd php-src \ |
| 63 |
&& ./configure \ |
| 64 |
--enable-bcmath \ |
| 65 |
--enable-mbstring \ |
| 66 |
--with-gmp \ |
| 67 |
--with-openssl \ |
| 68 |
--with-zlib \ |
| 69 |
--prefix=/usr/local/php-5.6 \ |
| 70 |
&& make \ |
| 71 |
&& make install \ |
| 72 |
&& make clean |
| 73 |
|
| 74 |
RUN wget -O phpunit https://phar.phpunit.de/phpunit-5.phar \ |
| 75 |
&& chmod +x phpunit \ |
| 76 |
&& mv phpunit /usr/local/php-5.6/bin |
| 77 |
|
| 78 |
# php 7.0 |
| 79 |
RUN cd php-src \ |
| 80 |
&& git checkout PHP-7.0.33 \ |
| 81 |
&& ./buildconf --force |
| 82 |
RUN cd php-src \ |
| 83 |
&& ./configure \ |
| 84 |
--enable-bcmath \ |
| 85 |
--enable-mbstring \ |
| 86 |
--with-gmp \ |
| 87 |
--with-openssl \ |
| 88 |
--with-zlib \ |
| 89 |
--prefix=/usr/local/php-7.0 \ |
| 90 |
&& make \ |
| 91 |
&& make install \ |
| 92 |
&& make clean |
| 93 |
RUN cd php-src \ |
| 94 |
&& ./configure \ |
| 95 |
--enable-maintainer-zts \ |
| 96 |
--enable-mbstring \ |
| 97 |
--with-gmp \ |
| 98 |
--with-openssl \ |
| 99 |
--with-zlib \ |
| 100 |
--prefix=/usr/local/php-7.0-zts \ |
| 101 |
&& make \ |
| 102 |
&& make install \ |
| 103 |
&& make clean |
| 104 |
|
| 105 |
RUN wget -O phpunit https://phar.phpunit.de/phpunit-6.phar \ |
| 106 |
&& chmod +x phpunit \ |
| 107 |
&& cp phpunit /usr/local/php-7.0/bin \ |
| 108 |
&& mv phpunit /usr/local/php-7.0-zts/bin |
| 109 |
|
| 110 |
# php 7.1 |
| 111 |
RUN cd php-src \ |
| 112 |
&& git checkout PHP-7.1.25 \ |
| 113 |
&& ./buildconf --force |
| 114 |
RUN cd php-src \ |
| 115 |
&& ./configure \ |
| 116 |
--enable-bcmath \ |
| 117 |
--enable-mbstring \ |
| 118 |
--with-gmp \ |
| 119 |
--with-openssl \ |
| 120 |
--with-zlib \ |
| 121 |
--prefix=/usr/local/php-7.1 \ |
| 122 |
&& make \ |
| 123 |
&& make install \ |
| 124 |
&& make clean |
| 125 |
RUN cd php-src \ |
| 126 |
&& ./configure \ |
| 127 |
--enable-maintainer-zts \ |
| 128 |
--enable-mbstring \ |
| 129 |
--with-gmp \ |
| 130 |
--with-openssl \ |
| 131 |
--with-zlib \ |
| 132 |
--prefix=/usr/local/php-7.1-zts \ |
| 133 |
&& make \ |
| 134 |
&& make install \ |
| 135 |
&& make clean |
| 136 |
|
| 137 |
RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.5.0.phar \ |
| 138 |
&& chmod +x phpunit \ |
| 139 |
&& cp phpunit /usr/local/php-7.1/bin \ |
| 140 |
&& mv phpunit /usr/local/php-7.1-zts/bin |
| 141 |
|
| 142 |
# php 7.2 |
| 143 |
RUN cd php-src \ |
| 144 |
&& git checkout PHP-7.2.13 \ |
| 145 |
&& ./buildconf --force |
| 146 |
RUN cd php-src \ |
| 147 |
&& ./configure \ |
| 148 |
--enable-bcmath \ |
| 149 |
--enable-mbstring \ |
| 150 |
--with-gmp \ |
| 151 |
--with-openssl \ |
| 152 |
--with-zlib \ |
| 153 |
--prefix=/usr/local/php-7.2 \ |
| 154 |
&& make \ |
| 155 |
&& make install \ |
| 156 |
&& make clean |
| 157 |
RUN cd php-src \ |
| 158 |
&& ./configure \ |
| 159 |
--enable-maintainer-zts \ |
| 160 |
--enable-mbstring \ |
| 161 |
--with-gmp \ |
| 162 |
--with-openssl \ |
| 163 |
--with-zlib \ |
| 164 |
--prefix=/usr/local/php-7.2-zts \ |
| 165 |
&& make \ |
| 166 |
&& make install \ |
| 167 |
&& make clean |
| 168 |
|
| 169 |
RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.5.0.phar \ |
| 170 |
&& chmod +x phpunit \ |
| 171 |
&& cp phpunit /usr/local/php-7.2/bin \ |
| 172 |
&& mv phpunit /usr/local/php-7.2-zts/bin |
| 173 |
|
| 174 |
# php 7.3 |
| 175 |
RUN cd php-src \ |
| 176 |
&& git checkout PHP-7.3.0 \ |
| 177 |
&& ./buildconf --force |
| 178 |
RUN cd php-src \ |
| 179 |
&& ./configure \ |
| 180 |
--enable-bcmath \ |
| 181 |
--enable-mbstring \ |
| 182 |
--with-gmp \ |
| 183 |
--with-openssl \ |
| 184 |
--with-zlib \ |
| 185 |
--prefix=/usr/local/php-7.3 \ |
| 186 |
&& make \ |
| 187 |
&& make install \ |
| 188 |
&& make clean |
| 189 |
RUN cd php-src \ |
| 190 |
&& ./configure \ |
| 191 |
--enable-maintainer-zts \ |
| 192 |
--enable-mbstring \ |
| 193 |
--with-gmp \ |
| 194 |
--with-openssl \ |
| 195 |
--with-zlib \ |
| 196 |
--prefix=/usr/local/php-7.3-zts \ |
| 197 |
&& make \ |
| 198 |
&& make install \ |
| 199 |
&& make clean |
| 200 |
|
| 201 |
RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.5.0.phar \ |
| 202 |
&& chmod +x phpunit \ |
| 203 |
&& cp phpunit /usr/local/php-7.3/bin \ |
| 204 |
&& mv phpunit /usr/local/php-7.3-zts/bin |
| 205 |
|
| 206 |
# php 7.4 |
| 207 |
RUN wget https://ftp.gnu.org/gnu/bison/bison-3.0.1.tar.gz -O /var/local/bison-3.0.1.tar.gz |
| 208 |
RUN cd /var/local \ |
| 209 |
&& tar -zxvf bison-3.0.1.tar.gz \ |
| 210 |
&& cd /var/local/bison-3.0.1 \ |
| 211 |
&& ./configure \ |
| 212 |
&& make \ |
| 213 |
&& make install |
| 214 |
|
| 215 |
RUN wget https://github.com/php/php-src/archive/php-7.4.0.tar.gz -O /var/local/php-7.4.0.tar.gz |
| 216 |
|
| 217 |
RUN cd /var/local \ |
| 218 |
&& tar -zxvf php-7.4.0.tar.gz |
| 219 |
|
| 220 |
RUN cd /var/local/php-src-php-7.4.0 \ |
| 221 |
&& ./buildconf --force \ |
| 222 |
&& ./configure \ |
| 223 |
--enable-bcmath \ |
| 224 |
--enable-mbstring \ |
| 225 |
--disable-mbregex \ |
| 226 |
--with-gmp \ |
| 227 |
--with-openssl \ |
| 228 |
--with-zlib \ |
| 229 |
--prefix=/usr/local/php-7.4 \ |
| 230 |
&& make \ |
| 231 |
&& make install \ |
| 232 |
&& make clean |
| 233 |
RUN cd /var/local/php-src-php-7.4.0 \ |
| 234 |
&& ./buildconf --force \ |
| 235 |
&& ./configure \ |
| 236 |
--enable-maintainer-zts \ |
| 237 |
--enable-mbstring \ |
| 238 |
--disable-mbregex \ |
| 239 |
--with-gmp \ |
| 240 |
--with-openssl \ |
| 241 |
--with-zlib \ |
| 242 |
--prefix=/usr/local/php-7.4-zts \ |
| 243 |
&& make \ |
| 244 |
&& make install \ |
| 245 |
&& make clean |
| 246 |
|
| 247 |
RUN wget -O phpunit https://phar.phpunit.de/phpunit-8.phar \ |
| 248 |
&& chmod +x phpunit \ |
| 249 |
&& cp phpunit /usr/local/php-7.4/bin \ |
| 250 |
&& mv phpunit /usr/local/php-7.4-zts/bin |
| 251 |
|
| 252 |
# Install php dependencies |
| 253 |
RUN apt-get clean && apt-get update && apt-get install -y --force-yes \ |
| 254 |
valgrind \ |
| 255 |
&& apt-get clean |