Update PHP docker images PHP versions (#31779)

pull/31832/head
Stanley Cheung 2 years ago committed by GitHub
parent a34f9e170f
commit fa42edef83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      examples/php/echo/apache.Dockerfile
  2. 2
      examples/php/echo/base.Dockerfile
  3. 6
      examples/php/echo/cli.Dockerfile
  4. 6
      examples/php/echo/fpm.Dockerfile
  5. 5
      examples/php/greeter_server.php
  6. 3
      src/php/bin/build_all_docker_images.sh
  7. 3
      src/php/bin/run_all_docker_images.sh
  8. 6
      src/php/docker/alpine/Dockerfile
  9. 8
      src/php/docker/centos7/Dockerfile
  10. 10
      src/php/docker/grpc-ext/Dockerfile
  11. 4
      src/php/docker/grpc-src/Dockerfile
  12. 6
      src/php/docker/i386/Dockerfile
  13. 39
      src/php/docker/php-future/Dockerfile
  14. 24
      src/php/docker/php-src/Dockerfile
  15. 6
      src/php/docker/php-zts/Dockerfile
  16. 12
      src/php/docker/php8.2/Dockerfile
  17. 16
      src/php/docker/php8/Dockerfile
  18. 4
      templates/examples/php/echo/copy_from_grpc_base.include
  19. 4
      templates/src/php/docker/alpine/Dockerfile.template
  20. 6
      templates/src/php/docker/centos7/Dockerfile.template
  21. 2
      templates/src/php/docker/dockerfile_cmd.include
  22. 3
      templates/src/php/docker/download_phpunit9.include
  23. 6
      templates/src/php/docker/grpc-ext/Dockerfile.template
  24. 2
      templates/src/php/docker/grpc-src/Dockerfile.template
  25. 2
      templates/src/php/docker/i386/Dockerfile.template
  26. 20
      templates/src/php/docker/php-src/Dockerfile.template
  27. 2
      templates/src/php/docker/php-zts/Dockerfile.template
  28. 8
      templates/src/php/docker/php8.2/Dockerfile.template
  29. 12
      templates/src/php/docker/php8/Dockerfile.template
  30. 4
      tools/buildgen/plugins/expand_version.py

@ -18,7 +18,7 @@ FROM composer:1.8.6 as composer
FROM grpc-php/base as grpc-base FROM grpc-php/base as grpc-base
FROM php:7.2-apache-stretch FROM php:7.4-apache-buster
RUN apt-get -qq update && apt-get -qq install -y git RUN apt-get -qq update && apt-get -qq install -y git
@ -32,8 +32,8 @@ COPY --from=grpc-base /github/grpc/cmake/build/grpc_php_plugin \
/usr/local/bin/protoc-gen-grpc /usr/local/bin/protoc-gen-grpc
COPY --from=grpc-base \ COPY --from=grpc-base \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \ /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so
RUN docker-php-ext-enable grpc RUN docker-php-ext-enable grpc

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:7.2-stretch FROM php:7.4-buster
RUN apt-get -qq update && apt-get -qq install -y \ RUN apt-get -qq update && apt-get -qq install -y \
autoconf automake cmake curl git libtool \ autoconf automake cmake curl git libtool \

@ -18,7 +18,7 @@ FROM composer:1.8.6 as composer
FROM grpc-php/base as grpc-base FROM grpc-php/base as grpc-base
FROM php:7.2-stretch FROM php:7.4-buster
RUN apt-get -qq update && apt-get -qq install -y git RUN apt-get -qq update && apt-get -qq install -y git
@ -32,8 +32,8 @@ COPY --from=grpc-base /github/grpc/cmake/build/grpc_php_plugin \
/usr/local/bin/protoc-gen-grpc /usr/local/bin/protoc-gen-grpc
COPY --from=grpc-base \ COPY --from=grpc-base \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \ /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so
RUN docker-php-ext-enable grpc RUN docker-php-ext-enable grpc

@ -18,7 +18,7 @@ FROM composer:1.8.6 as composer
FROM grpc-php/base as grpc-base FROM grpc-php/base as grpc-base
FROM php:7.2-fpm-stretch FROM php:7.4-fpm-buster
RUN apt-get -qq update && apt-get -qq install -y git RUN apt-get -qq update && apt-get -qq install -y git
@ -32,8 +32,8 @@ COPY --from=grpc-base /github/grpc/cmake/build/grpc_php_plugin \
/usr/local/bin/protoc-gen-grpc /usr/local/bin/protoc-gen-grpc
COPY --from=grpc-base \ COPY --from=grpc-base \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so \ /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so \
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so
RUN docker-php-ext-enable grpc RUN docker-php-ext-enable grpc

@ -26,13 +26,16 @@ class Greeter extends Helloworld\GreeterStub
\Grpc\ServerContext $serverContext \Grpc\ServerContext $serverContext
): ?\Helloworld\HelloReply { ): ?\Helloworld\HelloReply {
$name = $request->getName(); $name = $request->getName();
echo 'Received request: ' . $name . PHP_EOL;
$response = new \Helloworld\HelloReply(); $response = new \Helloworld\HelloReply();
$response->setMessage("Hello " . $name); $response->setMessage("Hello " . $name);
return $response; return $response;
} }
} }
$port = 50051;
$server = new \Grpc\RpcServer(); $server = new \Grpc\RpcServer();
$server->addHttp2Port('0.0.0.0:50051'); $server->addHttp2Port('0.0.0.0:'.$port);
$server->handle(new Greeter()); $server->handle(new Greeter());
echo 'Listening on port :' . $port . PHP_EOL;
$server->run(); $server->run();

@ -16,7 +16,7 @@
set -e set -e
cd $(dirname $0)/../../.. cd $(dirname $0)/../../..
ALL_IMAGES=( grpc-ext grpc-src alpine centos7 php-src php-future php-zts ALL_IMAGES=( grpc-ext grpc-src alpine centos7 php-src php-zts
fork-support i386 php8 php8.2 ) fork-support i386 php8 php8.2 )
if [[ "$1" == "--cmds" ]]; then if [[ "$1" == "--cmds" ]]; then
@ -36,5 +36,6 @@ fi
set -x set -x
for arg in "${lst[@]}" for arg in "${lst[@]}"
do do
echo "Building $arg..."
docker build -t grpc-php/"$arg" -f ./src/php/docker/"$arg"/Dockerfile . docker build -t grpc-php/"$arg" -f ./src/php/docker/"$arg"/Dockerfile .
done done

@ -16,7 +16,7 @@
set -e set -e
cd $(dirname $0)/../../.. cd $(dirname $0)/../../..
ALL_IMAGES=( grpc-ext grpc-src alpine centos7 php-src php-future php-zts ALL_IMAGES=( grpc-ext grpc-src alpine centos7 php-src php-zts
fork-support i386 php8 php8.2 ) fork-support i386 php8 php8.2 )
if [[ "$1" == "--cmds" ]]; then if [[ "$1" == "--cmds" ]]; then
@ -36,5 +36,6 @@ fi
set -x set -x
for arg in "${lst[@]}" for arg in "${lst[@]}"
do do
echo "Running $arg..."
docker run -it --rm grpc-php/"$arg" docker run -it --rm grpc-php/"$arg"
done done

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:7.2-alpine3.9 FROM php:7.4-alpine3.15
RUN apk add autoconf g++ make zlib-dev git bash wget linux-headers RUN apk add autoconf g++ make zlib-dev git bash wget linux-headers
@ -34,4 +34,6 @@ RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {} find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \
"--ignore-valgrind-undef-errors"]

@ -23,8 +23,8 @@ SHELL [ "/usr/bin/scl", "enable", "devtoolset-7"]
RUN yum install epel-release -y && \ RUN yum install epel-release -y && \
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && \ rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && \
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && \ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && \
yum --enablerepo=remi-php72 install php -y && \ yum --enablerepo=remi-php74 install php -y && \
yum-config-manager --enable remi-php72 > /dev/null && \ yum-config-manager --enable remi-php74 > /dev/null && \
yum install -y make wget which \ yum install -y make wget which \
gmp-devel libmpc-devel mpfr-devel yum-utils \ gmp-devel libmpc-devel mpfr-devel yum-utils \
php-devel php-fpm php-pear && \ php-devel php-fpm php-pear && \
@ -48,4 +48,6 @@ RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {} find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \
"--ignore-valgrind-undef-errors"]

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:7.2-stretch FROM php:7.4-buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \
autoconf automake git libtool pkg-config \ autoconf automake git libtool pkg-config \
@ -36,4 +36,10 @@ RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {} find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] RUN curl -sS https://getcomposer.org/installer | php && \
chmod +x composer.phar && \
mv composer.phar /usr/local/bin/composer
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \
"--ignore-valgrind-undef-errors"]

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:7.2-stretch FROM php:7.4-buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \
autoconf automake git libtool pkg-config \ autoconf automake git libtool pkg-config \
@ -43,4 +43,4 @@ RUN phpize && \
make install make install
CMD ["/github/grpc/src/php/bin/run_tests.sh"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--ignore-valgrind-undef-errors"]

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM i386/php:7.2 FROM i386/php:7.4
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \
autoconf automake git libtool pkg-config \ autoconf automake git libtool pkg-config \
@ -36,4 +36,6 @@ RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {} find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \
"--ignore-valgrind-undef-errors"]

@ -1,39 +0,0 @@
# Copyright 2019 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM php:7.4.11-buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \
autoconf automake git libtool pkg-config \
valgrind wget zlib1g-dev
ARG MAKEFLAGS=-j8
WORKDIR /tmp
RUN wget https://phar.phpunit.de/phpunit-8.5.13.phar && \
mv phpunit-8.5.13.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit
WORKDIR /github/grpc
COPY . .
RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"]

@ -12,13 +12,13 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM debian:stretch FROM debian:buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \
autoconf build-essential git libtool \ autoconf bison build-essential git libtool \
libcurl4-openssl-dev libedit-dev libsodium-dev \ libcurl4-openssl-dev libedit-dev libonig-dev libsodium-dev \
libssl-dev libxml2-dev \ libsqlite3-dev libssl-dev libxml2-dev \
pkg-config valgrind wget zlib1g-dev pkg-config re2c valgrind wget zlib1g-dev
WORKDIR /tmp WORKDIR /tmp
@ -28,25 +28,19 @@ RUN wget https://phar.phpunit.de/phpunit-8.5.13.phar && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit
RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz && \
tar -zxvf bison-3.4.2.tar.gz && \
cd bison-3.4.2 && \
./configure && make && make install
WORKDIR /github/php-src WORKDIR /github/php-src
ARG MAKEFLAGS=-j8 ARG MAKEFLAGS=-j8
RUN git clone https://github.com/php/php-src . RUN git clone https://github.com/php/php-src .
RUN git checkout php-7.2.22 && \ RUN git checkout php-7.4.33 && \
./buildconf --force && \ ./buildconf --force && \
./configure --build=x86_64-linux-gnu --enable-option-checking=fatal \ ./configure --build=x86_64-linux-gnu --enable-option-checking=fatal \
--enable-debug --enable-pcntl \ --enable-debug --enable-pcntl \
--enable-ftp --enable-mbstring --enable-mysqlnd \ --enable-ftp --enable-mbstring --enable-mysqlnd \
--with-curl --with-libedit --with-mhash --with-openssl \ --with-curl --with-libedit --with-mhash --with-openssl \
--with-sodium=shared --with-zlib && \ --with-pear --with-sodium=shared --with-zlib && \
make && make install make && make install
@ -58,4 +52,6 @@ RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {} find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \
"--ignore-valgrind-undef-errors"]

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:7.2-zts-stretch FROM php:7.4-zts-buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \
autoconf automake git libtool pkg-config \ autoconf automake git libtool pkg-config \
@ -36,4 +36,6 @@ RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {} find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \
"--ignore-valgrind-undef-errors"]

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:8.2.0RC4-zts-buster FROM php:8.2.0RC7-zts-buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \
autoconf automake git libtool pkg-config \ autoconf automake git libtool pkg-config \
@ -23,12 +23,6 @@ ARG MAKEFLAGS=-j8
WORKDIR /tmp WORKDIR /tmp
# install pear
RUN apt-get install expect -y && \
curl -LO http://pear.php.net/go-pear.phar && \
expect -c 'spawn php ./go-pear.phar; expect "or Enter to continue:"; send "\n"; expect "Currently used php.ini"; send "\n"; expect eof' && \
rm go-pear.phar
RUN wget https://phar.phpunit.de/phpunit-9.5.9.phar && \ RUN wget https://phar.phpunit.de/phpunit-9.5.9.phar && \
mv phpunit-9.5.9.phar /usr/local/bin/phpunit && \ mv phpunit-9.5.9.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit
@ -42,4 +36,6 @@ RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {} find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \
"--ignore-valgrind-undef-errors"]

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:8.0.0-zts-buster FROM php:8.1-buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \ RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y \
autoconf automake git libtool pkg-config \ autoconf automake git libtool pkg-config \
@ -23,14 +23,8 @@ ARG MAKEFLAGS=-j8
WORKDIR /tmp WORKDIR /tmp
# install pear RUN wget https://phar.phpunit.de/phpunit-9.5.9.phar && \
RUN apt-get install expect -y && \ mv phpunit-9.5.9.phar /usr/local/bin/phpunit && \
curl -LO http://pear.php.net/go-pear.phar && \
expect -c 'spawn php ./go-pear.phar; expect "or Enter to continue:"; send "\n"; expect "Currently used php.ini"; send "\n"; expect eof' && \
rm go-pear.phar
RUN wget https://phar.phpunit.de/phpunit-8.5.13.phar && \
mv phpunit-8.5.13.phar /usr/local/bin/phpunit && \
chmod +x /usr/local/bin/phpunit chmod +x /usr/local/bin/phpunit
@ -42,4 +36,6 @@ RUN pear package && \
find . -name grpc-*.tgz | xargs -I{} pecl install {} find . -name grpc-*.tgz | xargs -I{} pecl install {}
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", \
"--ignore-valgrind-undef-errors"]

@ -7,5 +7,5 @@ COPY --from=grpc-base /github/grpc/cmake/build/grpc_php_plugin ${'\\'}
/usr/local/bin/protoc-gen-grpc /usr/local/bin/protoc-gen-grpc
COPY --from=grpc-base ${'\\'} COPY --from=grpc-base ${'\\'}
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so ${'\\'} /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so ${'\\'}
/usr/local/lib/php/extensions/no-debug-non-zts-20170718/grpc.so /usr/local/lib/php/extensions/no-debug-non-zts-20190902/grpc.so

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:${settings.php_version.php_current_version()}-alpine3.9 FROM php:${settings.php_version.php_current_version()}-alpine3.15
RUN apk add autoconf g++ make zlib-dev git bash wget linux-headers RUN apk add autoconf g++ make zlib-dev git bash wget linux-headers
@ -27,4 +27,4 @@
<%include file="../pecl_ext_build_src.include" /> <%include file="../pecl_ext_build_src.include" />
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] <%include file="../dockerfile_cmd.include" />

@ -25,8 +25,8 @@
RUN yum install epel-release -y && ${'\\'} RUN yum install epel-release -y && ${'\\'}
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && ${'\\'} rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && ${'\\'}
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && ${'\\'} rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && ${'\\'}
yum --enablerepo=remi-php72 install php -y && ${'\\'} yum --enablerepo=remi-php74 install php -y && ${'\\'}
yum-config-manager --enable remi-php72 > /dev/null && ${'\\'} yum-config-manager --enable remi-php74 > /dev/null && ${'\\'}
yum install -y make wget which ${'\\'} yum install -y make wget which ${'\\'}
gmp-devel libmpc-devel mpfr-devel yum-utils ${'\\'} gmp-devel libmpc-devel mpfr-devel yum-utils ${'\\'}
php-devel php-fpm php-pear && ${'\\'} php-devel php-fpm php-pear && ${'\\'}
@ -41,4 +41,4 @@
<%include file="../pecl_ext_build_src.include" /> <%include file="../pecl_ext_build_src.include" />
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] <%include file="../dockerfile_cmd.include" />

@ -0,0 +1,2 @@
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", ${'\\'}
"--ignore-valgrind-undef-errors"]

@ -0,0 +1,3 @@
RUN wget https://phar.phpunit.de/phpunit-9.5.9.phar && ${'\\'}
mv phpunit-9.5.9.phar /usr/local/bin/phpunit && ${'\\'}
chmod +x /usr/local/bin/phpunit

@ -29,4 +29,8 @@
<%include file="../pecl_ext_build_src.include" /> <%include file="../pecl_ext_build_src.include" />
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] RUN curl -sS https://getcomposer.org/installer | php && ${'\\'}
chmod +x composer.phar && ${'\\'}
mv composer.phar /usr/local/bin/composer
<%include file="../dockerfile_cmd.include" />

@ -42,4 +42,4 @@
make install make install
CMD ["/github/grpc/src/php/bin/run_tests.sh"] CMD ["/github/grpc/src/php/bin/run_tests.sh", "--ignore-valgrind-undef-errors"]

@ -29,4 +29,4 @@
<%include file="../pecl_ext_build_src.include" /> <%include file="../pecl_ext_build_src.include" />
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] <%include file="../dockerfile_cmd.include" />

@ -17,38 +17,32 @@
FROM debian:${settings.php_version.php_debian_version()} FROM debian:${settings.php_version.php_debian_version()}
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y ${'\\'} RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y ${'\\'}
autoconf build-essential git libtool ${'\\'} autoconf bison build-essential git libtool ${'\\'}
libcurl4-openssl-dev libedit-dev libsodium-dev ${'\\'} libcurl4-openssl-dev libedit-dev libonig-dev libsodium-dev ${'\\'}
libssl-dev libxml2-dev ${'\\'} libsqlite3-dev libssl-dev libxml2-dev ${'\\'}
pkg-config valgrind wget zlib1g-dev pkg-config re2c valgrind wget zlib1g-dev
WORKDIR /tmp WORKDIR /tmp
<%include file="../download_phpunit.include" /> <%include file="../download_phpunit.include" />
RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz && ${'\\'}
tar -zxvf bison-3.4.2.tar.gz && ${'\\'}
cd bison-3.4.2 && ${'\\'}
./configure && make && make install
WORKDIR /github/php-src WORKDIR /github/php-src
ARG MAKEFLAGS=-j8 ARG MAKEFLAGS=-j8
RUN git clone https://github.com/php/php-src . RUN git clone https://github.com/php/php-src .
RUN git checkout php-7.2.22 && ${'\\'} RUN git checkout php-7.4.33 && ${'\\'}
./buildconf --force && ${'\\'} ./buildconf --force && ${'\\'}
./configure --build=x86_64-linux-gnu --enable-option-checking=fatal ${'\\'} ./configure --build=x86_64-linux-gnu --enable-option-checking=fatal ${'\\'}
--enable-debug --enable-pcntl ${'\\'} --enable-debug --enable-pcntl ${'\\'}
--enable-ftp --enable-mbstring --enable-mysqlnd ${'\\'} --enable-ftp --enable-mbstring --enable-mysqlnd ${'\\'}
--with-curl --with-libedit --with-mhash --with-openssl ${'\\'} --with-curl --with-libedit --with-mhash --with-openssl ${'\\'}
--with-sodium=shared --with-zlib && ${'\\'} --with-pear --with-sodium=shared --with-zlib && ${'\\'}
make && make install make && make install
<%include file="../pecl_ext_build_src.include" /> <%include file="../pecl_ext_build_src.include" />
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] <%include file="../dockerfile_cmd.include" />

@ -29,4 +29,4 @@
<%include file="../pecl_ext_build_src.include" /> <%include file="../pecl_ext_build_src.include" />
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] <%include file="../dockerfile_cmd.include" />

@ -1,6 +1,6 @@
%YAML 1.2 %YAML 1.2
--- | --- |
# Copyright 2019 gRPC authors. # Copyright 2020 gRPC authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:7.4.11-buster FROM php:8.2.0RC7-zts-buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y ${'\\'} RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y ${'\\'}
autoconf automake git libtool pkg-config ${'\\'} autoconf automake git libtool pkg-config ${'\\'}
@ -25,8 +25,8 @@
WORKDIR /tmp WORKDIR /tmp
<%include file="../download_phpunit.include" /> <%include file="../download_phpunit9.include" />
<%include file="../pecl_ext_build_src.include" /> <%include file="../pecl_ext_build_src.include" />
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] <%include file="../dockerfile_cmd.include" />

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
FROM php:8.0.0-zts-buster FROM php:8.1-buster
RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y ${'\\'} RUN apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq install -y ${'\\'}
autoconf automake git libtool pkg-config ${'\\'} autoconf automake git libtool pkg-config ${'\\'}
@ -25,14 +25,8 @@
WORKDIR /tmp WORKDIR /tmp
# install pear <%include file="../download_phpunit9.include" />
RUN apt-get install expect -y && ${'\\'}
curl -LO http://pear.php.net/go-pear.phar && ${'\\'}
expect -c 'spawn php ./go-pear.phar; expect "or Enter to continue:"; send "\n"; expect "Currently used php.ini"; send "\n"; expect eof' && ${'\\'}
rm go-pear.phar
<%include file="../download_phpunit.include" />
<%include file="../pecl_ext_build_src.include" /> <%include file="../pecl_ext_build_src.include" />
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests", "--ignore-valgrind-undef-errors"] <%include file="../dockerfile_cmd.include" />

@ -101,10 +101,10 @@ class Version:
return '%d.%d.%d' % (self.major, self.minor, self.patch) return '%d.%d.%d' % (self.major, self.minor, self.patch)
def php_current_version(self): def php_current_version(self):
return '7.2' return '7.4'
def php_debian_version(self): def php_debian_version(self):
return 'stretch' return 'buster'
def mako_plugin(dictionary): def mako_plugin(dictionary):

Loading…
Cancel
Save