| 1 |
# Copyright 2015 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 debian:11 |
| 16 |
|
| 17 |
#================= |
| 18 |
# Basic C core dependencies |
| 19 |
|
| 20 |
# C/C++ dependencies according to https://github.com/grpc/grpc/blob/master/BUILDING.md |
| 21 |
RUN apt-get update && apt-get install -y \ |
| 22 |
build-essential \ |
| 23 |
autoconf \ |
| 24 |
libtool \ |
| 25 |
pkg-config \ |
| 26 |
&& apt-get clean |
| 27 |
|
| 28 |
# GCC |
| 29 |
RUN apt-get update && apt-get install -y \ |
| 30 |
gcc \ |
| 31 |
g++ \ |
| 32 |
&& apt-get clean |
| 33 |
|
| 34 |
# libc6 |
| 35 |
RUN apt-get update && apt-get install -y \ |
| 36 |
libc6 \ |
| 37 |
libc6-dbg \ |
| 38 |
libc6-dev \ |
| 39 |
&& apt-get clean |
| 40 |
|
| 41 |
# Tools |
| 42 |
RUN apt-get update && apt-get install -y \ |
| 43 |
bzip2 \ |
| 44 |
curl \ |
| 45 |
dnsutils \ |
| 46 |
git \ |
| 47 |
lcov \ |
| 48 |
make \ |
| 49 |
strace \ |
| 50 |
time \ |
| 51 |
unzip \ |
| 52 |
wget \ |
| 53 |
zip \ |
| 54 |
&& apt-get clean |
| 55 |
|
| 56 |
|
| 57 |
RUN mkdir /var/local/jenkins |
| 58 |
|
| 59 |
|
| 60 |
RUN apt-get update && apt-get install -y python3 python3-pip python3-all-dev |
| 61 |
RUN ln -s $(which python3) /usr/bin/python |
| 62 |
|
| 63 |
# Google Cloud Platform API libraries |
| 64 |
# These are needed for uploading test results to BigQuery (e.g. by tools/run_tests scripts) |
| 65 |
RUN python3 -m pip install --upgrade google-auth==1.23.0 google-api-python-client==1.12.8 oauth2client==4.1.0 |
| 66 |
|
| 67 |
|
| 68 |
#================= |
| 69 |
# Install cmake |
| 70 |
# Note that this step should be only used for distributions that have new enough cmake to satisfy gRPC's cmake version requirement. |
| 71 |
|
| 72 |
RUN apt-get update && apt-get install -y cmake && apt-get clean |
| 73 |
|
| 74 |
#================= |
| 75 |
# Install ccache |
| 76 |
|
| 77 |
# Install ccache from source since ccache 3.x packaged with most linux distributions |
| 78 |
# does not support Redis backend for caching. |
| 79 |
RUN curl -sSL -o ccache.tar.gz https://github.com/ccache/ccache/releases/download/v4.5.1/ccache-4.5.1.tar.gz \ |
| 80 |
&& tar -zxf ccache.tar.gz \ |
| 81 |
&& cd ccache-4.5.1 \ |
| 82 |
&& mkdir build && cd build \ |
| 83 |
&& cmake -DCMAKE_BUILD_TYPE=Release -DZSTD_FROM_INTERNET=ON -DHIREDIS_FROM_INTERNET=ON .. \ |
| 84 |
&& make -j4 && make install \ |
| 85 |
&& cd ../.. \ |
| 86 |
&& rm -rf ccache-4.5.1 ccache.tar.gz |
| 87 |
|