| 1 |
%YAML 1.2 |
| 2 |
--- | |
| 3 |
# Copyright 2021 The gRPC Authors |
| 4 |
# |
| 5 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 |
# you may not use this file except in compliance with the License. |
| 7 |
# You may obtain a copy of the License at |
| 8 |
# |
| 9 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 |
# |
| 11 |
# Unless required by applicable law or agreed to in writing, software |
| 12 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 |
# See the License for the specific language governing permissions and |
| 15 |
# limitations under the License. |
| 16 |
|
| 17 |
FROM debian:stretch |
| 18 |
|
| 19 |
<%include file="../../apt_get_basic.include"/> |
| 20 |
<%include file="../../run_tests_python_deps.include"/> |
| 21 |
<%include file="../../cmake.include"/> |
| 22 |
<%include file="../../run_tests_addons.include"/> |
| 23 |
|
| 24 |
# Java required by Android SDK |
| 25 |
RUN apt-get update && apt-get -y install openjdk-8-jdk && apt-get clean |
| 26 |
|
| 27 |
# Install Android SDK |
| 28 |
ENV ANDROID_SDK_VERSION 4333796 |
| 29 |
RUN mkdir -p /opt/android-sdk && cd /opt/android-sdk && ${'\\'} |
| 30 |
wget -q https://dl.google.com/android/repository/sdk-tools-linux-$ANDROID_SDK_VERSION.zip && ${'\\'} |
| 31 |
unzip -q sdk-tools-linux-$ANDROID_SDK_VERSION.zip && ${'\\'} |
| 32 |
rm sdk-tools-linux-$ANDROID_SDK_VERSION.zip |
| 33 |
ENV ANDROID_SDK_PATH /opt/android-sdk |
| 34 |
ENV ANDROID_HOME /opt/android-sdk |
| 35 |
RUN yes | $ANDROID_SDK_PATH/tools/bin/sdkmanager --licenses # accept all licenses |
| 36 |
|
| 37 |
# Install ndk-bundle and cmake using sdkmanager |
| 38 |
RUN mkdir -p ~/.android && touch ~/.android/repositories.cfg |
| 39 |
RUN $ANDROID_SDK_PATH/tools/bin/sdkmanager ndk-bundle 'cmake;3.6.4111459' |
| 40 |
|
| 41 |
# Install Android NDK |
| 42 |
RUN curl -L -o android-ndk.zip http://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip && ${'\\'} |
| 43 |
unzip -q android-ndk.zip -d /opt && ${'\\'} |
| 44 |
rm -f android-ndk.zip |
| 45 |
ENV ANDROID_NDK_PATH /opt/android-ndk-r16b |
| 46 |
ENV ANDROID_NDK_HOME /opt/android-ndk-r16b |
| 47 |
|
| 48 |
# Install gcloud |
| 49 |
RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-407.0.0-linux-x86_64.tar.gz && ${'\\'} |
| 50 |
tar -xf google-cloud-cli-407.0.0-linux-x86_64.tar.gz && ${'\\'} |
| 51 |
./google-cloud-sdk/install.sh --bash-completion=false --path-update=true && ${'\\'} |
| 52 |
rm -rf google-cloud-cli-407.0.0-linux-x86_64.tar.gz |
| 53 |
RUN ln -s /google-cloud-sdk/bin/gcloud /usr/local/bin/gcloud |
| 54 |
|
| 55 |
# Define the default command. |
| 56 |
CMD ["bash"] |