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