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