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# Pinned version of the base image is used to avoid regressions caused 16# by rebuilding of this docker image. To see available versions, you can run 17# "gcloud container images list-tags gcr.io/oss-fuzz-base/base-builder" 18# TODO(jtattermusch): with the latest version we'd get clang12+ 19# which makes our build fail due to new warnings being treated 20# as errors. 21FROM gcr.io/oss-fuzz-base/base-builder@sha256:de220fd2433cd53bd06b215770dcd14a5e74632e0215acea7401fee8cafb18da 22 23# -------------------------- WARNING -------------------------------------- 24# If you are making changes to this file, consider changing 25# https://github.com/google/oss-fuzz/blob/master/projects/grpc/Dockerfile 26# accordingly. 27# ------------------------------------------------------------------------- 28 29# Install basic packages and Bazel dependencies. 30RUN apt-get update && apt-get install -y software-properties-common python-software-properties 31RUN add-apt-repository ppa:webupd8team/java 32RUN apt-get update && apt-get -y install \ 33 autoconf \ 34 build-essential \ 35 curl \ 36 wget \ 37 libtool \ 38 make \ 39 openjdk-8-jdk \ 40 vim 41 42#==================== 43# Python dependencies 44 45# Install dependencies 46 47RUN apt-get update && apt-get install -y \ 48 python-all-dev \ 49 python3-all-dev \ 50 python-setuptools 51 52# Install Python packages from PyPI 53RUN curl https://bootstrap.pypa.io/pip/2.7/get-pip.py | python2.7 54RUN pip install --upgrade pip==19.3.1 55RUN pip install virtualenv==16.7.9 56RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.15.0 twisted==17.5.0 57 58 59#================= 60# Compile CPython 3.6.9 from source 61 62RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev 63RUN apt-get update && apt-get install -y jq build-essential libffi-dev 64 65RUN cd /tmp && \ 66 wget -q https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz && \ 67 tar xzvf Python-3.6.9.tgz && \ 68 cd Python-3.6.9 && \ 69 ./configure && \ 70 make install 71 72RUN cd /tmp && \ 73 echo "ff7cdaef4846c89c1ec0d7b709bbd54d Python-3.6.9.tgz" > checksum.md5 && \ 74 md5sum -c checksum.md5 75 76RUN python3.6 -m ensurepip && \ 77 python3.6 -m pip install coverage 78 79 80#======================== 81# Bazel installation 82 83# Must be in sync with tools/bazel 84ENV BAZEL_VERSION 3.7.1 85 86# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper. 87ENV DISABLE_BAZEL_WRAPPER 1 88 89RUN apt-get update && apt-get install -y wget && apt-get clean 90RUN wget "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh" && \ 91 bash ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \ 92 rm bazel-$BAZEL_VERSION-installer-linux-x86_64.sh 93 94 95RUN mkdir -p /var/local/jenkins 96 97# Define the default command. 98CMD ["bash"] 99