• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15FROM php:8-zts-bookworm
16
17RUN apt-get update && apt-get install -y \
18  autoconf automake build-essential git libtool curl \
19  zlib1g-dev \
20  && apt-get clean
21
22#=================
23# Setup git to access working directory across docker boundary.
24# This avoids the "fatal: detected dubious ownership in repository XYZ"
25# git error.
26
27RUN git config --global --add safe.directory '*'
28RUN git config --global protocol.file.allow always
29
30#====================
31# run_tests.py python dependencies
32
33# Basic python dependencies to be able to run tools/run_tests python scripts
34# These dependencies are not sufficient to build gRPC Python, gRPC Python
35# deps are defined elsewhere (e.g. python_deps.include)
36RUN apt-get update && apt-get install -y \
37  python3 \
38  python3-pip \
39  python3-setuptools \
40  python3-yaml \
41  && apt-get clean
42
43# use pinned version of pip to avoid sudden breakages
44# Some newer distros that have already implemented PEP 668. Use of
45# --break-system-packages is to workaround that. We should look into using
46# virtualenv in Dockerfile though.
47RUN python3 -m pip install --break-system-packages --upgrade pip==19.3.1
48
49# TODO(jtattermusch): currently six is needed for tools/run_tests scripts
50# but since our python2 usage is deprecated, we should get rid of it.
51RUN python3 -m pip install six==1.16.0
52
53# Google Cloud Platform API libraries
54# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts)
55RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0
56
57
58# Install composer
59RUN curl -sS https://getcomposer.org/installer | php
60RUN mv composer.phar /usr/local/bin/composer
61
62#=================
63# Install cmake
64# Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement.
65
66RUN apt-get update && apt-get install -y cmake && apt-get clean
67
68RUN apt-get update && apt-get install -y ccache && apt-get clean
69
70RUN mkdir /var/local/jenkins
71
72# Required by XDS interop test harness.
73RUN python3 -m pip install virtualenv==16.7.9
74
75
76# Define the default command.
77CMD ["bash"]
78