diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile.template index 589084dc5a4..999eedf063e 100644 --- a/templates/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile.template +++ b/templates/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - <%include file="../../debian_8_header.include"/> + <%include file="../../debian_9_header.include"/> <%include file="../../php7_deps.include"/> <%include file="../../run_tests_addons.include"/> diff --git a/templates/tools/dockerfile/php7_deps.include b/templates/tools/dockerfile/php7_deps.include index 0c4c351d1e4..7a70623bac3 100644 --- a/templates/tools/dockerfile/php7_deps.include +++ b/templates/tools/dockerfile/php7_deps.include @@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y ${'\\'} ccache ${'\\'} curl ${'\\'} git ${'\\'} + libbison-dev ${'\\'} libcurl4-openssl-dev ${'\\'} libgmp-dev ${'\\'} libgmp3-dev ${'\\'} @@ -20,26 +21,17 @@ RUN apt-get update && apt-get install -y ${'\\'} time ${'\\'} unzip ${'\\'} wget ${'\\'} - zip && apt-get clean - -# Install other dependencies -RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h -RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz -O /var/local/bison-3.4.2.tar.gz -RUN cd /var/local ${'\\'} - && tar -zxvf bison-3.4.2.tar.gz ${'\\'} - && cd /var/local/bison-3.4.2 ${'\\'} - && ./configure ${'\\'} - && make ${'\\'} - && make install + zip ${'\\'} + zlib1g-dev && apt-get clean # Compile PHP7 from source RUN git clone https://github.com/php/php-src /var/local/git/php-src RUN cd /var/local/git/php-src ${'\\'} - && git checkout PHP-7.2.22 ${'\\'} + && git checkout PHP-7.2.34 ${'\\'} && ./buildconf --force ${'\\'} && ./configure ${'\\'} --with-gmp ${'\\'} --with-openssl ${'\\'} --with-zlib ${'\\'} - && make ${'\\'} + && make -j$(nproc) ${'\\'} && make install diff --git a/templates/tools/dockerfile/test/php7_jessie_x64/Dockerfile.template b/templates/tools/dockerfile/test/php7_debian9_x64/Dockerfile.template similarity index 94% rename from templates/tools/dockerfile/test/php7_jessie_x64/Dockerfile.template rename to templates/tools/dockerfile/test/php7_debian9_x64/Dockerfile.template index 8d8b34b98ce..d39daec6c84 100644 --- a/templates/tools/dockerfile/test/php7_jessie_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/php7_debian9_x64/Dockerfile.template @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. - <%include file="../../debian_8_header.include"/> + <%include file="../../debian_9_header.include"/> <%include file="../../php7_deps.include"/> <%include file="../../python_deps.include"/> diff --git a/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile index 519274ef159..4badb1218a6 100644 --- a/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_php7/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM debian:8 +FROM debian:9 #================= @@ -26,6 +26,7 @@ RUN apt-get update && apt-get install -y \ ccache \ curl \ git \ + libbison-dev \ libcurl4-openssl-dev \ libgmp-dev \ libgmp3-dev \ @@ -37,28 +38,19 @@ RUN apt-get update && apt-get install -y \ time \ unzip \ wget \ - zip && apt-get clean - -# Install other dependencies -RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h -RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz -O /var/local/bison-3.4.2.tar.gz -RUN cd /var/local \ - && tar -zxvf bison-3.4.2.tar.gz \ - && cd /var/local/bison-3.4.2 \ - && ./configure \ - && make \ - && make install + zip \ + zlib1g-dev && apt-get clean # Compile PHP7 from source RUN git clone https://github.com/php/php-src /var/local/git/php-src RUN cd /var/local/git/php-src \ - && git checkout PHP-7.2.22 \ + && git checkout PHP-7.2.34 \ && ./buildconf --force \ && ./configure \ --with-gmp \ --with-openssl \ --with-zlib \ - && make \ + && make -j$(nproc) \ && make install diff --git a/tools/dockerfile/test/php7_jessie_x64/Dockerfile b/tools/dockerfile/test/php7_debian9_x64/Dockerfile similarity index 82% rename from tools/dockerfile/test/php7_jessie_x64/Dockerfile rename to tools/dockerfile/test/php7_debian9_x64/Dockerfile index db91aaa44fe..c2c99f70f63 100644 --- a/tools/dockerfile/test/php7_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/php7_debian9_x64/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM debian:8 +FROM debian:9 #================= @@ -26,6 +26,7 @@ RUN apt-get update && apt-get install -y \ ccache \ curl \ git \ + libbison-dev \ libcurl4-openssl-dev \ libgmp-dev \ libgmp3-dev \ @@ -37,28 +38,19 @@ RUN apt-get update && apt-get install -y \ time \ unzip \ wget \ - zip && apt-get clean - -# Install other dependencies -RUN ln -sf /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h -RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz -O /var/local/bison-3.4.2.tar.gz -RUN cd /var/local \ - && tar -zxvf bison-3.4.2.tar.gz \ - && cd /var/local/bison-3.4.2 \ - && ./configure \ - && make \ - && make install + zip \ + zlib1g-dev && apt-get clean # Compile PHP7 from source RUN git clone https://github.com/php/php-src /var/local/git/php-src RUN cd /var/local/git/php-src \ - && git checkout PHP-7.2.22 \ + && git checkout PHP-7.2.34 \ && ./buildconf --force \ && ./configure \ --with-gmp \ --with-openssl \ --with-zlib \ - && make \ + && make -j$(nproc) \ && make install #==================== diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 2be68c8ce76..111e8d0d580 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -590,7 +590,7 @@ class Php7Language(object): return 'Makefile' def dockerfile_dir(self): - return 'tools/dockerfile/test/php7_jessie_%s' % _docker_arch_suffix( + return 'tools/dockerfile/test/php7_debian9_%s' % _docker_arch_suffix( self.args.arch) def __str__(self):