Skip to content

Commit

Permalink
Initial commit for android ci base image.
Browse files Browse the repository at this point in the history
  • Loading branch information
csonuryilmaz committed Nov 10, 2019
1 parent 5a99fe3 commit f2e2182
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
FROM openjdk:8-jdk
MAINTAINER csonuryilmaz@gmail.com

RUN echo "hi, android ci!"
ENV ANDROID_COMPILE_SDK "26"
ENV ANDROID_BUILD_TOOLS "26.0.1"
ENV ANDROID_SDK_TOOLS "4333796"

SHELL ["/bin/bash", "-c"]
RUN apt-get --quiet update --yes
RUN apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
RUN wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
RUN unzip -d android-sdk-linux android-sdk.zip
RUN mkdir -p /root/.android && touch /root/.android/repositories.cfg
RUN echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null
RUN echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null
RUN echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null

ENV ANDROID_HOME "${PWD}/android-sdk-linux"
ENV PATH "${PATH}:${PWD}/android-sdk-linux/platform-tools/"

RUN set +o pipefail
RUN yes | android-sdk-linux/tools/bin/sdkmanager --licenses
RUN set -o pipefail

0 comments on commit f2e2182

Please sign in to comment.