|
|
|
@ -12,9 +12,8 @@ |
|
|
|
|
# See the License for the specific language governing permissions and |
|
|
|
|
# limitations under the License. |
|
|
|
|
|
|
|
|
|
# Docker file for building gRPC artifacts. |
|
|
|
|
# Docker file for building gRPC artifacts for Android. |
|
|
|
|
|
|
|
|
|
# Recent enough cmake (>=3.9) needed by Android SDK |
|
|
|
|
FROM debian:sid |
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y debian-keyring && apt-key update |
|
|
|
@ -47,20 +46,26 @@ RUN apt-get update && apt-key update && apt-get install -y \ |
|
|
|
|
wget \ |
|
|
|
|
zip && apt-get clean |
|
|
|
|
|
|
|
|
|
# Cmake for cross-compilation |
|
|
|
|
RUN apt-get update && apt-get install -y cmake golang && apt-get clean |
|
|
|
|
# golang needed to build BoringSSL with cmake |
|
|
|
|
RUN apt-get update && apt-get install -y golang && apt-get clean |
|
|
|
|
|
|
|
|
|
################## |
|
|
|
|
# Android NDK |
|
|
|
|
# Java required by Android SDK |
|
|
|
|
RUN apt-get update && apt-get -y install openjdk-8-jdk && apt-get clean |
|
|
|
|
|
|
|
|
|
# Download and install Android NDK |
|
|
|
|
RUN wget -q https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip -O android_ndk.zip \ |
|
|
|
|
&& unzip -q android_ndk.zip \ |
|
|
|
|
&& rm android_ndk.zip \ |
|
|
|
|
&& mv ./android-ndk-r16b /opt |
|
|
|
|
ENV ANDROID_NDK_PATH /opt/android-ndk-r16b |
|
|
|
|
# Install Android SDK |
|
|
|
|
ENV ANDROID_SDK_VERSION 4333796 |
|
|
|
|
RUN mkdir -p /opt/android-sdk && cd /opt/android-sdk && \ |
|
|
|
|
wget -q https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_VERSION}.zip && \ |
|
|
|
|
unzip -q sdk-tools-linux-${ANDROID_SDK_VERSION}.zip && \ |
|
|
|
|
rm sdk-tools-linux-${ANDROID_SDK_VERSION}.zip |
|
|
|
|
ENV ANDROID_SDK_PATH /opt/android-sdk |
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y libpthread-stubs0-dev && apt-get clean |
|
|
|
|
# Install Android NDK and cmake using sdkmanager |
|
|
|
|
RUN mkdir -p ~/.android && touch ~/.android/repositories.cfg |
|
|
|
|
RUN yes | ${ANDROID_SDK_PATH}/tools/bin/sdkmanager --licenses # accept all licenses |
|
|
|
|
RUN ${ANDROID_SDK_PATH}/tools/bin/sdkmanager ndk-bundle 'cmake;3.6.4111459' |
|
|
|
|
ENV ANDROID_NDK_PATH ${ANDROID_SDK_PATH}/ndk-bundle |
|
|
|
|
ENV ANDROID_SDK_CMAKE ${ANDROID_SDK_PATH}/cmake/3.6.4111459/bin/cmake |
|
|
|
|
|
|
|
|
|
RUN mkdir /var/local/jenkins |
|
|
|
|
|
|
|
|
|