Dockerfile 5.0 KB

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