Dockerfile 5.1 KB

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