diff --git a/src/php/docker/alpine/Dockerfile b/src/php/docker/alpine/Dockerfile index 3750e76416a..e5b977c4aa6 100644 --- a/src/php/docker/alpine/Dockerfile +++ b/src/php/docker/alpine/Dockerfile @@ -28,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 3e794da4f60..93d0307c4a0 100644 --- a/src/php/docker/grpc-ext/Dockerfile +++ b/src/php/docker/grpc-ext/Dockerfile @@ -30,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 d8a1099017a..4998ab7dd1d 100644 --- a/src/php/docker/grpc-src/Dockerfile +++ b/src/php/docker/grpc-src/Dockerfile @@ -30,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 8e887644a44..b0f6c886902 100644 --- a/src/php/docker/php-future/Dockerfile +++ b/src/php/docker/php-future/Dockerfile @@ -30,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 443560fc091..972a297aafe 100644 --- a/src/php/docker/php-src/Dockerfile +++ b/src/php/docker/php-src/Dockerfile @@ -52,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 1b8bf7d11ba..9bc9d37152d 100644 --- a/src/php/docker/php-zts/Dockerfile +++ b/src/php/docker/php-zts/Dockerfile @@ -30,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 06b0e19e850..a350e7c9b63 100644 --- a/src/php/docker/php5/Dockerfile +++ b/src/php/docker/php5/Dockerfile @@ -30,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/grpc-src/Dockerfile.template b/templates/src/php/docker/grpc-src/Dockerfile.template index b04c77c2b63..57db1039318 100644 --- a/templates/src/php/docker/grpc-src/Dockerfile.template +++ b/templates/src/php/docker/grpc-src/Dockerfile.template @@ -29,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 {}