Debian Codegraph @

kokoro/linux/dockerfile/test/php80/Dockerfile

raw
1 FROM debian:stretch
2
3 # Install dependencies. We start with the basic ones require to build protoc
4 # and the C++ build
5 RUN apt-get update && apt-get install -y \
6 autoconf \
7 autotools-dev \
8 build-essential \
9 bzip2 \
10 ccache \
11 curl \
12 gcc \
13 git \
14 libc6 \
15 libc6-dbg \
16 libc6-dev \
17 libgtest-dev \
18 libtool \
19 make \
20 parallel \
21 time \
22 wget \
23 re2c \
24 sqlite3 \
25 vim \
26 libonig-dev \
27 libsqlite3-dev \
28 && apt-get clean
29
30 # Install php dependencies
31 RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
32 php \
33 libcurl4-openssl-dev \
34 libgmp-dev \
35 libgmp3-dev \
36 libssl-dev \
37 libxml2-dev \
38 unzip \
39 zlib1g-dev \
40 pkg-config \
41 && apt-get clean
42
43 # Install other dependencies
44 RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
45 RUN wget https://ftp.gnu.org/gnu/bison/bison-3.0.1.tar.gz -O /var/local/bison-3.0.1.tar.gz
46 RUN cd /var/local \
47 && tar -zxvf bison-3.0.1.tar.gz \
48 && cd /var/local/bison-3.0.1 \
49 && ./configure \
50 && make \
51 && make install
52
53 # Install composer
54 RUN curl -sS https://getcomposer.org/installer | php
55 RUN mv composer.phar /usr/local/bin/composer
56
57 # Download php source code
58 RUN git clone https://github.com/php/php-src
59
60 # php 8.0
61 RUN cd php-src \
62 && git checkout php-8.0.0 \
63 && ./buildconf --force
64 RUN cd php-src \
65 && ./configure \
66 --enable-bcmath \
67 --enable-mbstring \
68 --with-gmp \
69 --with-openssl \
70 --with-zlib \
71 --prefix=/usr/local/php-8.0 \
72 && make \
73 && make install \
74 && make clean
75 RUN cd php-src \
76 && ./configure \
77 --enable-bcmath \
78 --enable-mbstring \
79 --enable-maintainer-zts \
80 --with-gmp \
81 --with-openssl \
82 --with-zlib \
83 --prefix=/usr/local/php-8.0-zts \
84 && make \
85 && make install \
86 && make clean
87
88 RUN wget -O phpunit https://phar.phpunit.de/phpunit-9.phar \
89 && chmod +x phpunit \
90 && cp phpunit /usr/local/php-8.0/bin \
91 && mv phpunit /usr/local/php-8.0-zts/bin
92
93 # php 8.1
94 RUN cd php-src \
95 && git checkout php-8.1.2 \
96 && ./buildconf --force
97 RUN cd php-src \
98 && ./configure \
99 --enable-bcmath \
100 --enable-mbstring \
101 --with-gmp \
102 --with-openssl \
103 --with-zlib \
104 --prefix=/usr/local/php-8.1 \
105 && make \
106 && make install \
107 && make clean
108 RUN cd php-src \
109 && ./configure \
110 --enable-bcmath \
111 --enable-mbstring \
112 --enable-maintainer-zts \
113 --with-gmp \
114 --with-openssl \
115 --with-zlib \
116 --prefix=/usr/local/php-8.1-zts \
117 && make \
118 && make install \
119 && make clean
120
121 # Install php dependencies
122 RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
123 valgrind \
124 && apt-get clean