• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#=================
2# PHP7 dependencies
3
4# Install Git and basic packages.
5RUN apt-get update && apt-get install -y ${'\\'}
6  autoconf ${'\\'}
7  automake ${'\\'}
8  build-essential ${'\\'}
9  ccache ${'\\'}
10  curl ${'\\'}
11  git ${'\\'}
12  libcurl4-openssl-dev ${'\\'}
13  libgmp-dev ${'\\'}
14  libgmp3-dev ${'\\'}
15  libssl-dev ${'\\'}
16  libtool ${'\\'}
17  libxml2-dev ${'\\'}
18  pkg-config ${'\\'}
19  re2c ${'\\'}
20  time ${'\\'}
21  unzip ${'\\'}
22  wget ${'\\'}
23  zip && apt-get clean
24
25# Install other dependencies
26RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h
27RUN wget http://ftp.gnu.org/gnu/bison/bison-2.6.4.tar.gz -O /var/local/bison-2.6.4.tar.gz
28RUN cd /var/local ${'\\'}
29  && tar -zxvf bison-2.6.4.tar.gz ${'\\'}
30  && cd /var/local/bison-2.6.4 ${'\\'}
31  && ./configure ${'\\'}
32  && make ${'\\'}
33  && make install
34
35# Compile PHP7 from source
36RUN git clone https://github.com/php/php-src /var/local/git/php-src
37RUN cd /var/local/git/php-src ${'\\'}
38  && git checkout PHP-7.0.9 ${'\\'}
39  && ./buildconf --force ${'\\'}
40  && ./configure ${'\\'}
41  --with-gmp ${'\\'}
42  --with-openssl ${'\\'}
43  --with-zlib ${'\\'}
44  && make ${'\\'}
45  && make install
46