Debian Codegraph @

tools/dockerfile/test/cxx_gcc_12_x64/Dockerfile

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