7dee0051176d0cda012e31c9bcfb4eb57f7854bb
[platform/upstream/grpc.git] / tools / dockerfile / test / bazel / Dockerfile
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 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.
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 \
27   autoconf \
28   build-essential \
29   curl \
30   libtool \
31   make \
32   openjdk-8-jdk \
33   vim
34
35 #====================
36 # Python dependencies
37
38 # Install dependencies
39
40 RUN apt-get update && apt-get install -y \
41     python-all-dev \
42     python3-all-dev \
43     python-pip
44
45 # Install Python packages from PyPI
46 RUN pip install --upgrade pip==10.0.1
47 RUN pip install virtualenv
48 RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0
49
50
51 #========================
52 # Bazel installation
53
54 RUN apt-get update && apt-get install -y wget && apt-get clean
55 RUN wget https://github.com/bazelbuild/bazel/releases/download/0.20.0/bazel-0.20.0-installer-linux-x86_64.sh && \
56   bash ./bazel-0.20.0-installer-linux-x86_64.sh && \
57   rm bazel-0.20.0-installer-linux-x86_64.sh
58
59
60 RUN mkdir -p /var/local/jenkins
61
62 # Define the default command.
63 CMD ["bash"]