Dockerfile 5.5 KB

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