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 15FROM gcr.io/oss-fuzz-base/base-builder 16 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 20# accordingly. 21# ------------------------------------------------------------------------- 22 23# Install basic packages and Bazel dependencies. 24RUN apt-get update && apt-get install -y software-properties-common python-software-properties 25RUN add-apt-repository ppa:webupd8team/java 26RUN apt-get update && apt-get -y install \ 27 autoconf \ 28 build-essential \ 29 curl \ 30 wget \ 31 libtool \ 32 make \ 33 openjdk-8-jdk \ 34 vim 35 36#==================== 37# Python dependencies 38 39# Install dependencies 40 41RUN apt-get update && apt-get install -y \ 42 python-all-dev \ 43 python3-all-dev \ 44 python-setuptools 45 46# Install Python packages from PyPI 47RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7 48RUN pip install --upgrade pip==19.3.1 49RUN pip install virtualenv==16.7.9 50RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0 51 52 53#================= 54# Compile CPython 3.6.9 from source 55 56RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev 57RUN apt-get update && apt-get install -y jq build-essential libffi-dev 58 59RUN cd /tmp && \ 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 && \ 62 cd Python-3.6.9 && \ 63 ./configure && \ 64 make install 65 66RUN cd /tmp && \ 67 echo "ff7cdaef4846c89c1ec0d7b709bbd54d Python-3.6.9.tgz" > checksum.md5 && \ 68 md5sum -c checksum.md5 69 70RUN python3.6 -m ensurepip && \ 71 python3.6 -m pip install coverage 72 73 74#======================== 75# Bazel installation 76 77# Must be in sync with tools/bazel 78ENV BAZEL_VERSION 1.0.0 79 80# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. 81ENV DISABLE_BAZEL_WRAPPER 1 82 83RUN apt-get update && apt-get install -y wget && apt-get clean 84RUN 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 87 88 89RUN mkdir -p /var/local/jenkins 90 91# Define the default command. 92CMD ["bash"] 93