Dockerfile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. FROM centos:centos7
  15. RUN yum update -y && \
  16. yum install epel-release -y && \
  17. rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm && \
  18. rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm && \
  19. yum --enablerepo=remi-php72 install php -y && \
  20. yum-config-manager --enable remi-php72 && \
  21. yum install -y php-fpm php-pear make php-devel wget libmpc-devel mpfr-devel gmp-devel yum-utils && \
  22. yum clean all -y
  23. ARG MAKEFLAGS=-j8
  24. WORKDIR /tmp
  25. RUN yum install -y centos-release-scl && \
  26. yum install -y devtoolset-4-gcc*
  27. SHELL [ "/usr/bin/scl", "enable", "devtoolset-4"]
  28. RUN wget https://phar.phpunit.de/phpunit-5.7.27.phar && \
  29. mv phpunit-5.7.27.phar /usr/local/bin/phpunit && \
  30. chmod +x /usr/local/bin/phpunit
  31. WORKDIR /github/grpc
  32. COPY . .
  33. RUN pear package && \
  34. find . -name grpc-*.tgz | xargs -I{} pecl install {}
  35. CMD ["/github/grpc/src/php/bin/run_tests.sh", "--skip-persistent-channel-tests"]