gen-protobuf.Dockerfile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. FROM thecodingmachine/php:8.0-v4-cli
  2. ENV PHP_EXTENSION_GRPC=1
  3. ENV PHP_EXTENSION_BCMATH=1
  4. USER root:root
  5. RUN wget -O /tmp/z.$$ https://github.com/protocolbuffers/protobuf/releases/download/v22.0/protoc-22.0-linux-x86_64.zip \
  6. && unzip -d /usr/local /tmp/z.$$ bin/protoc \
  7. && unzip -d /usr /tmp/z.$$ include/google/protobuf/*.proto \
  8. && rm /tmp/z.$$
  9. RUN chmod a+x /usr/local/bin/protoc
  10. # Copying a compiled version of grpc_php_plugin
  11. COPY php_plugin/grpc_php_plugin /usr/local/bin/grpc_php_plugin
  12. RUN chmod a+x /usr/local/bin/grpc_php_plugin
  13. # [ OR ]
  14. # Building grpc_php_plugin from sources
  15. # RUN sudo apt update
  16. # RUN sudo apt install -y build-essential cmake pkg-config libsystemd-dev
  17. # RUN mkdir -p /opt/grpc && cd /opt/grpc \
  18. # && git clone -b v1.52.1 https://github.com/grpc/grpc grpc-1.25.1 \
  19. # && cd grpc-1.25.1 \
  20. # && git submodule update --init \
  21. # && mkdir -p cmake/build \
  22. # && cd cmake/build \
  23. # && cmake ../.. \
  24. # && make grpc_php_plugin \
  25. # && cp grpc_php_plugin /usr/local/bin/grpc_php_plugin