php-grpc.Dockerfile 780 B

123456789101112131415161718192021
  1. FROM ubuntu:20.04
  2. LABEL authors="ilyakharev"
  3. RUN apt-get upgrade
  4. RUN apt-get update
  5. RUN apt-get install -y software-properties-common
  6. RUN apt-get update
  7. RUN add-apt-repository -y ppa:ondrej/php
  8. RUN apt-get update
  9. RUN apt-get install -y libz-dev
  10. RUN apt-get update
  11. RUN apt-get install -y php7.2-fpm php7.2-cli php7.2-curl php7.2-json php-pear php7.2-dev php7.2-bcmath
  12. RUN apt-get install -y php7.2-xml
  13. RUN apt-get update
  14. RUN curl -sS https://getcomposer.org/installer | php
  15. RUN mv composer.phar /usr/local/bin/composer
  16. RUN pecl install grpc-1.45.0
  17. RUN echo "extension=grpc.so" >> /etc/php/7.2/cli/php.ini
  18. RUN apt-get install --fix-missing -y git
  19. RUN echo "grpc.enable_fork_support = 1" >> /etc/php/7.2/cli/php.ini
  20. RUN echo "grpc.poll_strategy = poll" >> /etc/php/7.2/cli/php.ini