1 # Copyright 2015 gRPC authors.
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
7 # http://www.apache.org/licenses/LICENSE-2.0
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.
15 FROM gcr.io/oss-fuzz-base/base-builder
17 # -------------------------- WARNING --------------------------------------
18 # If you are making changes to this file, consider changing
19 # https://github.com/google/oss-fuzz/blob/master/projects/grpc/Dockerfile
21 # -------------------------------------------------------------------------
23 # Install basic packages and Bazel dependencies.
24 RUN apt-get update && apt-get install -y software-properties-common python-software-properties
25 RUN add-apt-repository ppa:webupd8team/java
26 RUN apt-get update && apt-get -y install \
39 # Install dependencies
41 RUN apt-get update && apt-get install -y \
46 # Install Python packages from PyPI
47 RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7
48 RUN pip install --upgrade pip==19.3.1
49 RUN pip install virtualenv==16.7.9
50 RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.15.0 twisted==17.5.0
54 # Compile CPython 3.6.9 from source
56 RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev
57 RUN apt-get update && apt-get install -y jq build-essential libffi-dev
60 wget -q https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz && \
61 tar xzvf Python-3.6.9.tgz && \
67 echo "ff7cdaef4846c89c1ec0d7b709bbd54d Python-3.6.9.tgz" > checksum.md5 && \
68 md5sum -c checksum.md5
70 RUN python3.6 -m ensurepip && \
71 python3.6 -m pip install coverage
74 #========================
77 # Must be in sync with tools/bazel
78 ENV BAZEL_VERSION 2.2.0
80 # The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
81 ENV DISABLE_BAZEL_WRAPPER 1
83 RUN apt-get update && apt-get install -y wget && apt-get clean
84 RUN wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh" && \
85 bash ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
86 rm bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
89 RUN mkdir -p /var/local/jenkins
91 # Define the default command.