• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 gRPC authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15FROM debian:stretch
16
17RUN apt-get -qq update && apt-get -qq install -y \
18  autoconf build-essential git libtool \
19  libcurl4-openssl-dev libedit-dev libsodium-dev \
20  libssl-dev libxml2-dev \
21  pkg-config valgrind wget zlib1g-dev
22
23
24WORKDIR /tmp
25
26RUN wget https://phar.phpunit.de/phpunit-8.5.13.phar && \
27  mv phpunit-8.5.13.phar /usr/local/bin/phpunit && \
28  chmod +x /usr/local/bin/phpunit
29
30
31RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz && \
32  tar -zxvf bison-3.4.2.tar.gz && \
33  cd bison-3.4.2 && \
34  ./configure && make && make install
35
36
37WORKDIR /github/php-src
38
39ARG MAKEFLAGS=-j8
40
41RUN git clone https://github.com/php/php-src .
42
43RUN git checkout php-7.2.22 && \
44  ./buildconf --force && \
45  ./configure --build=x86_64-linux-gnu --enable-option-checking=fatal \
46    --enable-debug --enable-pcntl \
47    --enable-ftp --enable-mbstring --enable-mysqlnd \
48    --with-curl --with-libedit --with-mhash --with-openssl \
49    --with-sodium=shared --with-zlib && \
50  make && make install
51
52
53WORKDIR /github/grpc
54
55COPY . .
56
57RUN pear package && \
58  find . -name grpc-*.tgz | xargs -I{} pecl install {}
59
60
61CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"]
62