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