xref: /aosp_15_r20/external/grpc-grpc/templates/tools/dockerfile/test/sanity/Dockerfile.template (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1%YAML 1.2
2--- |
3  # Copyright 2015 gRPC authors.
4  #
5  # Licensed under the Apache License, Version 2.0 (the "License");
6  # you may not use this file except in compliance with the License.
7  # You may obtain a copy of the License at
8  #
9  #     http://www.apache.org/licenses/LICENSE-2.0
10  #
11  # Unless required by applicable law or agreed to in writing, software
12  # distributed under the License is distributed on an "AS IS" BASIS,
13  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  # See the License for the specific language governing permissions and
15  # limitations under the License.
16
17  FROM silkeh/clang:17-bullseye
18
19  <%include file="../../apt_get_basic.include"/>
20
21  # Install Python 3.7 from source (and installed as a default python3)
22  # (Bullseye comes with Python 3.9 which isn't supported by pytype yet)
23  RUN apt update && apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev ${'\\'}
24                              libnss3-dev libssl-dev libreadline-dev libffi-dev libbz2-dev
25  RUN curl -O https://www.python.org/ftp/python/3.7.9/Python-3.7.9.tar.xz && ${'\\'}
26  tar -xf Python-3.7.9.tar.xz && ${'\\'}
27  cd Python-3.7.9 && ${'\\'}
28  ./configure && ${'\\'}
29  make -j 4 && ${'\\'}
30  make install
31  RUN curl https://bootstrap.pypa.io/get-pip.py | python3
32
33  <%include file="../../gcp_api_libraries.include"/>
34  <%include file="../../run_tests_addons.include"/>
35
36  #========================
37  # Sanity test dependencies
38
39  RUN apt-get update && apt-get install -y ${"\\"}
40        autoconf ${"\\"}
41        automake ${"\\"}
42        libtool ${"\\"}
43        curl ${"\\"}
44        shellcheck
45
46  # otherwise clang-tidy will report missing <gtest/gtest.h> header
47  RUN apt-get update && apt-get install -y libgtest-dev && apt-get clean
48
49  RUN python3 -m pip install simplejson mako virtualenv==16.7.9 lxml six
50
51  # Upgrade Python's YAML library
52  RUN python3 -m pip install --upgrade --ignore-installed PyYAML==5.4.1 --user
53
54  # Install prerequisites for the clang-tidy script
55  RUN apt-get update && apt-get install -y jq git && apt-get clean
56
57  <%include file="../../bazel.include"/>
58  <%include file="../../buildifier.include"/>
59
60  # Define the default command.
61  CMD ["bash"]
62