Dockerfile 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. FROM debian:jessie
  2. # Install dependencies. We start with the basic ones require to build protoc
  3. # and the C++ build
  4. RUN apt-get update && apt-get install -y \
  5. autoconf \
  6. autotools-dev \
  7. build-essential \
  8. bzip2 \
  9. ccache \
  10. curl \
  11. gcc \
  12. git \
  13. libc6 \
  14. libc6-dbg \
  15. libc6-dev \
  16. libgtest-dev \
  17. libtool \
  18. make \
  19. parallel \
  20. time \
  21. wget \
  22. re2c \
  23. sqlite3 \
  24. libsqlite3-dev \
  25. && apt-get clean
  26. # Install php dependencies
  27. RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
  28. php5 \
  29. libcurl4-openssl-dev \
  30. libgmp-dev \
  31. libgmp3-dev \
  32. libssl-dev \
  33. libxml2-dev \
  34. unzip \
  35. zlib1g-dev \
  36. pkg-config \
  37. && apt-get clean
  38. # Install other dependencies
  39. RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
  40. RUN wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz -O /var/local/bison-2.6.4.tar.gz
  41. RUN 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. # Install composer
  48. RUN curl -sS https://getcomposer.org/installer | php
  49. RUN mv composer.phar /usr/local/bin/composer
  50. # Download php source code
  51. RUN git clone https://github.com/php/php-src
  52. # php 5.5
  53. RUN cd php-src \
  54. && git checkout PHP-5.5.38 \
  55. && ./buildconf --force
  56. RUN cd php-src \
  57. && ./configure \
  58. --enable-bcmath \
  59. --with-gmp \
  60. --with-openssl \
  61. --with-zlib \
  62. --prefix=/usr/local/php-5.5 \
  63. && make \
  64. && make install \
  65. && make clean
  66. RUN cd php-src \
  67. && ./configure \
  68. --enable-maintainer-zts \
  69. --with-gmp \
  70. --with-openssl \
  71. --with-zlib \
  72. --prefix=/usr/local/php-5.5-zts \
  73. && make \
  74. && make install \
  75. && make clean
  76. RUN 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. # php 5.6
  81. RUN cd php-src \
  82. && git checkout PHP-5.6.39 \
  83. && ./buildconf --force
  84. RUN cd php-src \
  85. && ./configure \
  86. --enable-bcmath \
  87. --with-gmp \
  88. --with-openssl \
  89. --with-zlib \
  90. --prefix=/usr/local/php-5.6 \
  91. && make \
  92. && make install \
  93. && make clean
  94. RUN cd php-src \
  95. && ./configure \
  96. --enable-maintainer-zts \
  97. --with-gmp \
  98. --with-openssl \
  99. --with-zlib \
  100. --prefix=/usr/local/php-5.6-zts \
  101. && make \
  102. && make install \
  103. && make clean
  104. RUN 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. # php 7.0
  109. RUN cd php-src \
  110. && git checkout PHP-7.0.33 \
  111. && ./buildconf --force
  112. RUN cd php-src \
  113. && ./configure \
  114. --enable-bcmath \
  115. --with-gmp \
  116. --with-openssl \
  117. --with-zlib \
  118. --prefix=/usr/local/php-7.0 \
  119. && make \
  120. && make install \
  121. && make clean
  122. RUN cd php-src \
  123. && ./configure \
  124. --enable-maintainer-zts \
  125. --with-gmp \
  126. --with-openssl \
  127. --with-zlib \
  128. --prefix=/usr/local/php-7.0-zts \
  129. && make \
  130. && make install \
  131. && make clean
  132. RUN 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. # php 7.1
  137. RUN cd php-src \
  138. && git checkout PHP-7.1.25 \
  139. && ./buildconf --force
  140. RUN cd php-src \
  141. && ./configure \
  142. --enable-bcmath \
  143. --with-gmp \
  144. --with-openssl \
  145. --with-zlib \
  146. --prefix=/usr/local/php-7.1 \
  147. && make \
  148. && make install \
  149. && make clean
  150. RUN cd php-src \
  151. && ./configure \
  152. --enable-maintainer-zts \
  153. --with-gmp \
  154. --with-openssl \
  155. --with-zlib \
  156. --prefix=/usr/local/php-7.1-zts \
  157. && make \
  158. && make install \
  159. && make clean
  160. RUN 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. # php 7.2
  165. RUN cd php-src \
  166. && git checkout PHP-7.2.13 \
  167. && ./buildconf --force
  168. RUN cd php-src \
  169. && ./configure \
  170. --enable-bcmath \
  171. --with-gmp \
  172. --with-openssl \
  173. --with-zlib \
  174. --prefix=/usr/local/php-7.2 \
  175. && make \
  176. && make install \
  177. && make clean
  178. RUN cd php-src \
  179. && ./configure \
  180. --enable-maintainer-zts \
  181. --with-gmp \
  182. --with-openssl \
  183. --with-zlib \
  184. --prefix=/usr/local/php-7.2-zts \
  185. && make \
  186. && make install \
  187. && make clean
  188. RUN 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. # php 7.3
  193. RUN cd php-src \
  194. && git checkout PHP-7.3.0 \
  195. && ./buildconf --force
  196. RUN cd php-src \
  197. && ./configure \
  198. --enable-bcmath \
  199. --with-gmp \
  200. --with-openssl \
  201. --with-zlib \
  202. --prefix=/usr/local/php-7.3 \
  203. && make \
  204. && make install \
  205. && make clean
  206. RUN cd php-src \
  207. && ./configure \
  208. --enable-maintainer-zts \
  209. --with-gmp \
  210. --with-openssl \
  211. --with-zlib \
  212. --prefix=/usr/local/php-7.3-zts \
  213. && make \
  214. && make install \
  215. && make clean
  216. RUN 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. # php 7.4
  221. RUN wget https://ftp.gnu.org/gnu/bison/bison-3.0.1.tar.gz -O /var/local/bison-3.0.1.tar.gz
  222. RUN cd /var/local \
  223. && tar -zxvf bison-3.0.1.tar.gz \
  224. && cd /var/local/bison-3.0.1 \
  225. && ./configure \
  226. && make \
  227. && make install
  228. RUN wget https://github.com/php/php-src/archive/php-7.4.0.tar.gz -O /var/local/php-7.4.0.tar.gz
  229. RUN cd /var/local \
  230. && tar -zxvf php-7.4.0.tar.gz
  231. RUN cd /var/local/php-src-php-7.4.0 \
  232. && ./buildconf --force \
  233. && ./configure \
  234. --enable-bcmath \
  235. --with-gmp \
  236. --with-openssl \
  237. --with-zlib \
  238. --prefix=/usr/local/php-7.4 \
  239. && make \
  240. && make install \
  241. && make clean
  242. RUN cd /var/local/php-src-php-7.4.0 \
  243. && ./buildconf --force \
  244. && ./configure \
  245. --enable-maintainer-zts \
  246. --with-gmp \
  247. --with-openssl \
  248. --with-zlib \
  249. --prefix=/usr/local/php-7.4-zts \
  250. && make \
  251. && make install \
  252. && make clean
  253. RUN wget -O phpunit https://phar.phpunit.de/phpunit-8.phar \
  254. && chmod +x phpunit \
  255. && cp phpunit /usr/local/php-7.4/bin \
  256. && mv phpunit /usr/local/php-7.4-zts/bin
  257. # Install php dependencies
  258. RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
  259. valgrind \
  260. && apt-get clean