diff --git a/src/php/docker/alpine/Dockerfile b/src/php/docker/alpine/Dockerfile index 03a9e73eaf7..e5b977c4aa6 100644 --- a/src/php/docker/alpine/Dockerfile +++ b/src/php/docker/alpine/Dockerfile @@ -16,6 +16,8 @@ FROM php:7.2-alpine3.9 RUN apk add autoconf g++ make zlib-dev git bash wget +ARG MAKEFLAGS=-j8 + WORKDIR /tmp @@ -26,10 +28,7 @@ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \ WORKDIR /github/grpc -RUN git clone https://github.com/grpc/grpc . && \ - git submodule update --init - -COPY src/ ./src +COPY . . RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} diff --git a/src/php/docker/grpc-ext/Dockerfile b/src/php/docker/grpc-ext/Dockerfile index 4b9e898690c..93d0307c4a0 100644 --- a/src/php/docker/grpc-ext/Dockerfile +++ b/src/php/docker/grpc-ext/Dockerfile @@ -18,6 +18,8 @@ RUN apt-get -qq update && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ valgrind wget zlib1g-dev +ARG MAKEFLAGS=-j8 + WORKDIR /tmp @@ -28,10 +30,7 @@ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \ WORKDIR /github/grpc -RUN git clone https://github.com/grpc/grpc . && \ - git submodule update --init - -COPY src/ ./src +COPY . . RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} diff --git a/src/php/docker/grpc-src/Dockerfile b/src/php/docker/grpc-src/Dockerfile index 595ee37e2c3..4998ab7dd1d 100644 --- a/src/php/docker/grpc-src/Dockerfile +++ b/src/php/docker/grpc-src/Dockerfile @@ -18,6 +18,8 @@ RUN apt-get -qq update && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ valgrind wget zlib1g-dev +ARG MAKEFLAGS=-j8 + WORKDIR /tmp @@ -28,16 +30,12 @@ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \ WORKDIR /github/grpc -RUN git clone https://github.com/grpc/grpc . && \ - git submodule update --init && \ - make && make install +COPY . . +RUN make && make install -WORKDIR /github/grpc/src/php/ext/grpc -COPY src/php/ext/grpc/*.c ./ -COPY src/php/ext/grpc/*.h ./ -COPY src/php/ext/grpc/config.m4 ./ +WORKDIR /github/grpc/src/php/ext/grpc RUN phpize && \ ./configure --enable-tests && \ diff --git a/src/php/docker/php-future/Dockerfile b/src/php/docker/php-future/Dockerfile index a3625a807e7..b0f6c886902 100644 --- a/src/php/docker/php-future/Dockerfile +++ b/src/php/docker/php-future/Dockerfile @@ -18,6 +18,8 @@ RUN apt-get -qq update && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ wget zlib1g-dev +ARG MAKEFLAGS=-j8 + WORKDIR /tmp @@ -28,10 +30,7 @@ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \ WORKDIR /github/grpc -RUN git clone https://github.com/grpc/grpc . && \ - git submodule update --init - -COPY src/ ./src +COPY . . RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} diff --git a/src/php/docker/php-src/Dockerfile b/src/php/docker/php-src/Dockerfile index b225e00e402..972a297aafe 100644 --- a/src/php/docker/php-src/Dockerfile +++ b/src/php/docker/php-src/Dockerfile @@ -36,6 +36,8 @@ RUN wget http://ftp.gnu.org/gnu/bison/bison-3.4.2.tar.gz && \ WORKDIR /github/php-src +ARG MAKEFLAGS=-j8 + RUN git clone https://github.com/php/php-src . RUN git checkout php-7.2.22 && \ @@ -50,10 +52,7 @@ RUN git checkout php-7.2.22 && \ WORKDIR /github/grpc -RUN git clone https://github.com/grpc/grpc . && \ - git submodule update --init - -COPY src/ ./src +COPY . . RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} diff --git a/src/php/docker/php-zts/Dockerfile b/src/php/docker/php-zts/Dockerfile index 1ce321c8fd7..9bc9d37152d 100644 --- a/src/php/docker/php-zts/Dockerfile +++ b/src/php/docker/php-zts/Dockerfile @@ -18,6 +18,8 @@ RUN apt-get -qq update && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ wget zlib1g-dev +ARG MAKEFLAGS=-j8 + WORKDIR /tmp @@ -28,10 +30,7 @@ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \ WORKDIR /github/grpc -RUN git clone https://github.com/grpc/grpc . && \ - git submodule update --init - -COPY src/ ./src +COPY . . RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} diff --git a/src/php/docker/php5/Dockerfile b/src/php/docker/php5/Dockerfile index a6202559466..a350e7c9b63 100644 --- a/src/php/docker/php5/Dockerfile +++ b/src/php/docker/php5/Dockerfile @@ -18,6 +18,8 @@ RUN apt-get -qq update && apt-get -qq install -y \ autoconf automake git libtool pkg-config \ valgrind wget zlib1g-dev +ARG MAKEFLAGS=-j8 + WORKDIR /tmp @@ -28,10 +30,7 @@ RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \ WORKDIR /github/grpc -RUN git clone https://github.com/grpc/grpc . && \ - git submodule update --init - -COPY src/ ./src +COPY . . RUN pear package && \ find . -name grpc-*.tgz | xargs -I{} pecl install {} diff --git a/templates/src/php/docker/alpine/Dockerfile.template b/templates/src/php/docker/alpine/Dockerfile.template index 8bd0ca6ac4d..493b320e831 100644 --- a/templates/src/php/docker/alpine/Dockerfile.template +++ b/templates/src/php/docker/alpine/Dockerfile.template @@ -18,6 +18,8 @@ RUN apk add autoconf g++ make zlib-dev git bash wget + ARG MAKEFLAGS=-j8 + WORKDIR /tmp diff --git a/templates/src/php/docker/grpc-ext/Dockerfile.template b/templates/src/php/docker/grpc-ext/Dockerfile.template index 23f2011d407..8dbfd35b065 100644 --- a/templates/src/php/docker/grpc-ext/Dockerfile.template +++ b/templates/src/php/docker/grpc-ext/Dockerfile.template @@ -20,6 +20,8 @@ autoconf automake git libtool pkg-config ${'\\'} valgrind wget zlib1g-dev + ARG MAKEFLAGS=-j8 + WORKDIR /tmp diff --git a/templates/src/php/docker/grpc-src/Dockerfile.template b/templates/src/php/docker/grpc-src/Dockerfile.template index dcaf7cc8ea9..57db1039318 100644 --- a/templates/src/php/docker/grpc-src/Dockerfile.template +++ b/templates/src/php/docker/grpc-src/Dockerfile.template @@ -20,6 +20,8 @@ autoconf automake git libtool pkg-config ${'\\'} valgrind wget zlib1g-dev + ARG MAKEFLAGS=-j8 + WORKDIR /tmp @@ -27,16 +29,12 @@ WORKDIR /github/grpc - RUN git clone https://github.com/grpc/grpc . && ${'\\'} - git submodule update --init && ${'\\'} - make && make install + COPY . . + RUN make && make install - WORKDIR /github/grpc/src/php/ext/grpc - COPY src/php/ext/grpc/*.c ./ - COPY src/php/ext/grpc/*.h ./ - COPY src/php/ext/grpc/config.m4 ./ + WORKDIR /github/grpc/src/php/ext/grpc RUN phpize && ${'\\'} ./configure --enable-tests && ${'\\'} diff --git a/templates/src/php/docker/pecl_ext_build_src.include b/templates/src/php/docker/pecl_ext_build_src.include index 45d2f426163..0f9300c4dda 100644 --- a/templates/src/php/docker/pecl_ext_build_src.include +++ b/templates/src/php/docker/pecl_ext_build_src.include @@ -1,9 +1,6 @@ WORKDIR /github/grpc -RUN git clone https://github.com/grpc/grpc . && ${'\\'} - git submodule update --init - -COPY src/ ./src +COPY . . RUN pear package && ${'\\'} find . -name grpc-*.tgz | xargs -I{} pecl install {} diff --git a/templates/src/php/docker/php-future/Dockerfile.template b/templates/src/php/docker/php-future/Dockerfile.template index 4a5dfe960dc..f9abb2fc509 100644 --- a/templates/src/php/docker/php-future/Dockerfile.template +++ b/templates/src/php/docker/php-future/Dockerfile.template @@ -20,6 +20,8 @@ autoconf automake git libtool pkg-config ${'\\'} wget zlib1g-dev + ARG MAKEFLAGS=-j8 + WORKDIR /tmp diff --git a/templates/src/php/docker/php-src/Dockerfile.template b/templates/src/php/docker/php-src/Dockerfile.template index e5c637bcb93..d048aa6e4b4 100644 --- a/templates/src/php/docker/php-src/Dockerfile.template +++ b/templates/src/php/docker/php-src/Dockerfile.template @@ -35,6 +35,8 @@ WORKDIR /github/php-src + ARG MAKEFLAGS=-j8 + RUN git clone https://github.com/php/php-src . RUN git checkout php-7.2.22 && ${'\\'} diff --git a/templates/src/php/docker/php-zts/Dockerfile.template b/templates/src/php/docker/php-zts/Dockerfile.template index 75675f08382..1190d61424d 100644 --- a/templates/src/php/docker/php-zts/Dockerfile.template +++ b/templates/src/php/docker/php-zts/Dockerfile.template @@ -20,6 +20,8 @@ autoconf automake git libtool pkg-config ${'\\'} wget zlib1g-dev + ARG MAKEFLAGS=-j8 + WORKDIR /tmp diff --git a/templates/src/php/docker/php5/Dockerfile.template b/templates/src/php/docker/php5/Dockerfile.template index e6c7b59c9e0..1f97bc50a71 100644 --- a/templates/src/php/docker/php5/Dockerfile.template +++ b/templates/src/php/docker/php5/Dockerfile.template @@ -20,6 +20,8 @@ autoconf automake git libtool pkg-config ${'\\'} valgrind wget zlib1g-dev + ARG MAKEFLAGS=-j8 + WORKDIR /tmp