| 1 |
# Copyright 2019 gRPC authors. |
| 2 |
# |
| 3 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 |
# you may not use this file except in compliance with the License. |
| 5 |
# You may obtain a copy of the License at |
| 6 |
# |
| 7 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 |
# |
| 9 |
# Unless required by applicable law or agreed to in writing, software |
| 10 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
# See the License for the specific language governing permissions and |
| 13 |
# limitations under the License. |
| 14 |
|
| 15 |
FROM centos:centos7 |
| 16 |
|
| 17 |
RUN yum update -y && \ |
| 18 |
yum install -y centos-release-scl && \ |
| 19 |
yum install -y devtoolset-7-gcc* |
| 20 |
|
| 21 |
SHELL [ "/usr/bin/scl", "enable", "devtoolset-7"] |
| 22 |
|
| 23 |
RUN yum install epel-release -y && \ |
| 24 |
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && \ |
| 25 |
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && \ |
| 26 |
yum --enablerepo=remi-php72 install php -y && \ |
| 27 |
yum-config-manager --enable remi-php72 > /dev/null && \ |
| 28 |
yum install -y make wget which \ |
| 29 |
gmp-devel libmpc-devel mpfr-devel yum-utils \ |
| 30 |
php-devel php-fpm php-pear && \ |
| 31 |
yum clean all -y |
| 32 |
|
| 33 |
ARG MAKEFLAGS=-j8 |
| 34 |
|
| 35 |
|
| 36 |
WORKDIR /tmp |
| 37 |
|
| 38 |
RUN wget https://phar.phpunit.de/phpunit-8.5.13.phar && \ |
| 39 |
mv phpunit-8.5.13.phar /usr/local/bin/phpunit && \ |
| 40 |
chmod +x /usr/local/bin/phpunit |
| 41 |
|
| 42 |
|
| 43 |
WORKDIR /github/grpc |
| 44 |
|
| 45 |
COPY . . |
| 46 |
|
| 47 |
RUN pear package && \ |
| 48 |
find . -name grpc-*.tgz | xargs -I{} pecl install {} |
| 49 |
|
| 50 |
|
| 51 |
CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"] |