• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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# Image(a4ad7a70fe10) is built on Apr 19, 2023
19FROM gcr.io/oss-fuzz-base/base-builder@sha256:a4ad7a70fe10674c880ca8618a564860114a31dcdd6f9896aac89f0b2f86112a
20
21# -------------------------- WARNING --------------------------------------
22# If you are making changes to this file, consider changing
23# https://github.com/google/oss-fuzz/blob/master/projects/grpc/Dockerfile
24# accordingly.
25# -------------------------------------------------------------------------
26
27# Install basic packages
28RUN apt-get update && apt-get -y install \
29  autoconf \
30  build-essential \
31  curl \
32  libtool \
33  make \
34  vim \
35  wget
36
37#========================
38# Bazel installation
39
40# Must be in sync with tools/bazel
41ENV BAZEL_VERSION 6.1.2
42
43# The correct bazel version is already preinstalled, no need to use //tools/bazel wrapper.
44ENV DISABLE_BAZEL_WRAPPER 1
45
46# Download the correct bazel version and make sure it's on path.
47RUN BAZEL_ARCH_SUFFIX="$(uname -m | sed s/aarch64/arm64/)" \
48  && curl -sSL --fail -o /usr/local/bin/bazel "https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-linux-$BAZEL_ARCH_SUFFIX" \
49  && chmod a+x /usr/local/bin/bazel
50
51# Normally we would run "bazel --version" here to make sure bazel
52# was correctly installed, but we can't do that because
53# of # https://github.com/bazelbuild/bazel/issues/11379.
54# We want to keep the arm64 version of the image buildable
55# on x64 with use of qemu-user-static & binfmt emulation,
56# but the self-extraction is broken for bazel currently.
57# The binary will work correctly when run on real arm64
58# hardware, when qemu-user-static isn't getting into the way.
59
60#=================
61# Setup git to access working directory across docker boundary
62
63RUN git config --global --add safe.directory /var/local/jenkins/grpc
64RUN git config --global protocol.file.allow always
65
66
67RUN apt-get install -y gdb
68
69RUN mkdir -p /var/local/jenkins
70
71# Define the default command.
72CMD ["bash"]
73