Dockerfile 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # Copyright 2016 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. # debian 11 = "bullseye"
  15. FROM php:7.3-zts-bullseye
  16. RUN apt-get update && apt-get install -y \
  17. autoconf automake build-essential git libtool curl \
  18. zlib1g-dev \
  19. && apt-get clean
  20. # install php pthreads from source
  21. # TODO(jtattermusch): is this really needed?
  22. # See https://github.com/grpc/grpc/pull/23056
  23. WORKDIR /tmp
  24. RUN git clone https://github.com/krakjoe/pthreads
  25. RUN cd pthreads && \
  26. phpize && \
  27. ./configure && \
  28. make && \
  29. make install
  30. #====================
  31. # run_tests.py python dependencies
  32. # Basic python dependencies to be able to run tools/run_tests python scripts
  33. # These dependencies are not sufficient to build gRPC Python, gRPC Python
  34. # deps are defined elsewhere (e.g. python_deps.include)
  35. RUN apt-get update && apt-get install -y \
  36. python3 \
  37. python3-pip \
  38. python3-setuptools \
  39. python3-yaml \
  40. && apt-get clean
  41. # use pinned version of pip to avoid sudden breakages
  42. RUN python3 -m pip install --upgrade pip==19.3.1
  43. # TODO(jtattermusch): currently six is needed for tools/run_tests scripts
  44. # but since our python2 usage is deprecated, we should get rid of it.
  45. RUN python3 -m pip install six==1.16.0
  46. # Google Cloud Platform API libraries
  47. # These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts)
  48. RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0
  49. # Install composer
  50. RUN curl -sS https://getcomposer.org/installer | php
  51. RUN mv composer.phar /usr/local/bin/composer
  52. #=================
  53. # Install cmake
  54. # Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement.
  55. RUN apt-get update && apt-get install -y cmake && apt-get clean
  56. #=================
  57. # Install ccache
  58. # Install ccache from source since ccache 3.x packaged with most linux distributions
  59. # does not support Redis backend for caching.
  60. RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \
  61. && tar -zxf ccache.tar.gz \
  62. && cd ccache-4.5.1 \
  63. && mkdir build && cd build \
  64. && cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \
  65. && make -j4 && make install \
  66. && cd ../.. \
  67. && rm -rf ccache-4.5.1 ccache.tar.gz
  68. RUN mkdir /var/local/jenkins
  69. # Seems required by XDS interop tests.
  70. RUN python3 -m pip install virtualenv==16.7.9
  71. # Define the default command.
  72. CMD ["bash"]