Dockerfile 4.7 KB

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