Public Repository

Last pushed: 7 months ago
Short Description
Android image running android-24/25 with Google API used for CI automated testing
Full Description

Dockerfile for this image:

android-sdk_r25.2.3
build tools 24.0.3, 25.0.3
android-24, android-25 (with addons)


#
# GitLab CI Android Runner
#

FROM openjdk:8-jdk
MAINTAINER Andrew Dai "andrew.dai@bcgdv.com"

ENV DEBIAN_FRONTEND noninteractive

ENV ANDROID_SDK_URL="https://dl.google.com/android/repository/tools_r25.2.3-linux.zip" \
    ANDROID_BUILD_TOOLS_VERSION=25.0.3 \
    ANDROID_HOME="/opt/android"

# Setup environment
ENV PATH $PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION

# GO to workspace
RUN mkdir -p /opt
WORKDIR /opt

RUN apt-get --quiet update --yes
RUN apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1

# Installs Android SDK
RUN mkdir android && cd android && \
    wget -O tools.zip ${ANDROID_SDK_URL} && \
    unzip tools.zip && rm tools.zip

RUN mkdir -p $ANDROID_HOME/licenses/ && \
    (echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license) && \
    (echo "84831b9409646a918e30573bab4c9c91346d8abd" > $ANDROID_HOME/licenses/android-sdk-preview-license) && \
    sdkmanager --update && \
    (sdkmanager "platform-tools" "extras;android;m2repository" "extras;google;google_play_services" "extras;google;m2repository" "build-tools;25.0.3" "platforms;android-24" "platforms;android-25" --verbose) && \
    chmod a+x -R $ANDROID_HOME && \
    chown -R root:root $ANDROID_HOME

RUN which adb
RUN which sdkmanager
RUN sdkmanager --list
RUN ulimit -c unlimited

# Clean up
RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
    apt-get autoremove -y && \
    apt-get clean
Docker Pull Command
Owner
andrewdai