1# Copyright 2016 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:jessie
16
17#=================
18# PHP7 dependencies
19
20# Install Git and basic packages.
21RUN apt-get update && apt-get install -y \
22  autoconf \
23  automake \
24  build-essential \
25  ccache \
26  curl \
27  git \
28  libcurl4-openssl-dev \
29  libgmp-dev \
30  libgmp3-dev \
31  libssl-dev \
32  libtool \
33  libxml2-dev \
34  pkg-config \
35  re2c \
36  time \
37  unzip \
38  wget \
39  zip && apt-get clean
40
41# Install other dependencies
42RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
43RUN wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz -O /var/local/bison-2.6.4.tar.gz
44RUN cd /var/local \
45  && tar -zxvf bison-2.6.4.tar.gz \
46  && cd /var/local/bison-2.6.4 \
47  && ./configure \
48  && make \
49  && make install
50
51# Compile PHP7 from source
52RUN git clone https://github.com/php/php-src /var/local/git/php-src
53RUN cd /var/local/git/php-src \
54  && git checkout PHP-7.0.9 \
55  && ./buildconf --force \
56  && ./configure \
57  --with-gmp \
58  --with-openssl \
59  --with-zlib \
60  && make \
61  && make install
62
63
64RUN mkdir /var/local/jenkins
65
66# Install composer
67RUN curl -sS https://getcomposer.org/installer | php
68RUN mv composer.phar /usr/local/bin/composer
69
70# Define the default command.
71CMD ["bash"]
72
73