1# Copyright 2017 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 debian:jessie
16
17# Install JDK 8 and Git
18#
19RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
20  echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
21  echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
22  apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
23
24RUN apt-get update && apt-get -y install \
25      git \
26      libapr1 \
27      oracle-java8-installer \
28      && \
29    apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
30
31ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
32ENV PATH $PATH:$JAVA_HOME/bin
33
34
35#====================
36# Python dependencies
37
38# Install dependencies
39
40RUN 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
46RUN pip install --upgrade pip==10.0.1
47RUN pip install virtualenv
48RUN 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# Trigger download of as many Gradle artifacts as possible.
52RUN git clone --recursive --depth 1 https://github.com/grpc/grpc-java.git && \
53  cd grpc-java && \
54  ./gradlew :grpc-interop-testing:installDist -PskipCodegen=true && \
55  rm -r "$(pwd)"
56
57# Define the default command.
58CMD ["bash"]
59