Skip to content

Commit

Permalink
Add php 7.4 to docker image (#6971) (#6975)
Browse files Browse the repository at this point in the history
* Add php 7.4 to docker image

* Use https links
  • Loading branch information
TeBoring committed Dec 3, 2019
1 parent c04d9c9 commit 7bb8b10
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 1 deletion.
45 changes: 45 additions & 0 deletions kokoro/linux/dockerfile/test/php/Dockerfile
Expand Up @@ -20,6 +20,9 @@ RUN apt-get update && apt-get install -y \
parallel \
time \
wget \
re2c \
sqlite3 \
libsqlite3-dev \
&& apt-get clean

# Install php dependencies
Expand Down Expand Up @@ -232,6 +235,48 @@ RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
&& cp phpunit /usr/local/php-7.3/bin \
&& mv phpunit /usr/local/php-7.3-zts/bin

# php 7.4
RUN wget https://ftp.gnu.org/gnu/bison/bison-3.0.1.tar.gz -O /var/local/bison-3.0.1.tar.gz
RUN cd /var/local \
&& tar -zxvf bison-3.0.1.tar.gz \
&& cd /var/local/bison-3.0.1 \
&& ./configure \
&& make \
&& make install

RUN wget https://github.com/php/php-src/archive/php-7.4.0.tar.gz -O /var/local/php-7.4.0.tar.gz

RUN cd /var/local \
&& tar -zxvf php-7.4.0.tar.gz

RUN cd /var/local/php-src-php-7.4.0 \
&& ./buildconf --force \
&& ./configure \
--enable-bcmath \
--with-gmp \
--with-openssl \
--with-zlib \
--prefix=/usr/local/php-7.4 \
&& make \
&& make install \
&& make clean
RUN cd /var/local/php-src-php-7.4.0 \
&& ./buildconf --force \
&& ./configure \
--enable-maintainer-zts \
--with-gmp \
--with-openssl \
--with-zlib \
--prefix=/usr/local/php-7.4-zts \
&& make \
&& make install \
&& make clean

RUN wget -O phpunit https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x phpunit \
&& cp phpunit /usr/local/php-7.4/bin \
&& mv phpunit /usr/local/php-7.4-zts/bin

# Install php dependencies
RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
valgrind \
Expand Down
45 changes: 44 additions & 1 deletion kokoro/linux/dockerfile/test/php_32bit/Dockerfile
@@ -1,4 +1,4 @@
FROM 32bit/debian:jessie
FROM i386/debian:jessie

# Install dependencies. We start with the basic ones require to build protoc
# and the C++ build
Expand All @@ -20,6 +20,9 @@ RUN apt-get update && apt-get install -y \
parallel \
time \
wget \
re2c \
sqlite3 \
libsqlite3-dev \
&& apt-get clean

# Install php dependencies
Expand Down Expand Up @@ -218,6 +221,46 @@ RUN wget -O phpunit https://phar.phpunit.de/phpunit-7.phar \
&& cp phpunit /usr/local/php-7.3/bin \
&& mv phpunit /usr/local/php-7.3-zts/bin

# php 7.4
RUN wget https://ftp.gnu.org/gnu/bison/bison-3.0.1.tar.gz -O /var/local/bison-3.0.1.tar.gz
RUN cd /var/local \
&& tar -zxvf bison-3.0.1.tar.gz \
&& cd /var/local/bison-3.0.1 \
&& ./configure \
&& make \
&& make install

RUN wget https://github.com/php/php-src/archive/php-7.4.0.tar.gz -O /var/local/php-7.4.0.tar.gz

RUN cd /var/local \
&& tar -zxvf php-7.4.0.tar.gz

RUN cd /var/local/php-src-php-7.4.0 \
&& ./buildconf --force \
&& ./configure \
--enable-bcmath \
--with-openssl \
--with-zlib \
--prefix=/usr/local/php-7.4 \
&& make \
&& make install \
&& make clean
RUN cd /var/local/php-src-php-7.4.0 \
&& ./buildconf --force \
&& ./configure \
--enable-maintainer-zts \
--with-openssl \
--with-zlib \
--prefix=/usr/local/php-7.4-zts \
&& make \
&& make install \
&& make clean

RUN wget -O phpunit https://phar.phpunit.de/phpunit-8.phar \
&& chmod +x phpunit \
&& cp phpunit /usr/local/php-7.4/bin \
&& mv phpunit /usr/local/php-7.4-zts/bin

# Install php dependencies
RUN apt-get clean && apt-get update && apt-get install -y --force-yes \
valgrind \
Expand Down

0 comments on commit 7bb8b10

Please sign in to comment.