• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2016 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# Docker file for building gRPC artifacts for Android.
16
17FROM debian:sid
18
19RUN apt-get update && apt-get install -y debian-keyring && apt-key update
20
21# Install Git and basic packages.
22RUN apt-get update && apt-key update && apt-get install -y \
23  autoconf \
24  autotools-dev \
25  build-essential \
26  bzip2 \
27  clang \
28  curl \
29  gcc \
30  gcc-multilib \
31  git \
32  golang \
33  libc6 \
34  libc6-dbg \
35  libc6-dev \
36  libgtest-dev \
37  libtool \
38  make \
39  perl \
40  strace \
41  python-dev \
42  python-setuptools \
43  python-yaml \
44  telnet \
45  unzip \
46  wget \
47  zip && apt-get clean
48
49# golang needed to build BoringSSL with cmake
50RUN apt-get update && apt-get install -y golang && apt-get clean
51
52# Java required by Android SDK
53RUN apt-get update && apt-get -y install openjdk-8-jdk && apt-get clean
54
55# Install Android SDK
56ENV ANDROID_SDK_VERSION 4333796
57RUN mkdir -p /opt/android-sdk && cd /opt/android-sdk && \
58    wget -q https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_VERSION}.zip && \
59    unzip -q sdk-tools-linux-${ANDROID_SDK_VERSION}.zip && \
60    rm sdk-tools-linux-${ANDROID_SDK_VERSION}.zip
61ENV ANDROID_SDK_PATH /opt/android-sdk
62
63# Install Android NDK and cmake using sdkmanager
64RUN mkdir -p ~/.android && touch ~/.android/repositories.cfg
65RUN yes | ${ANDROID_SDK_PATH}/tools/bin/sdkmanager --licenses  # accept all licenses
66RUN ${ANDROID_SDK_PATH}/tools/bin/sdkmanager ndk-bundle 'cmake;3.6.4111459'
67ENV ANDROID_NDK_PATH ${ANDROID_SDK_PATH}/ndk-bundle
68ENV ANDROID_SDK_CMAKE ${ANDROID_SDK_PATH}/cmake/3.6.4111459/bin/cmake
69
70RUN mkdir /var/local/jenkins
71
72# Define the default command.
73CMD ["bash"]
74