Last active
April 15, 2020 08:09
Android build image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:12.04 | |
MAINTAINER saymagic "saymagic.dev@gmail.com" | |
RUN apt-get update -qq && \ | |
apt-get install -y --no-install-recommends openjdk-7-jdk libgd2-xpm ia32-libs ia32-libs-multiarch unzip curl && \ | |
apt-get clean | |
ENV USR_LOCAL /usr/local | |
ENV ANDROID_SDK_URL http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz | |
RUN curl -L "${ANDROID_SDK_URL}" | tar --no-same-owner -xz -C ${USR_LOCAL} | |
ENV ANDROID_HOME ${USR_LOCAL}/android-sdk-linux | |
ENV ANDROID_SDK ${USR_LOCAL}/android-sdk-linux | |
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools | |
RUN echo "export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools" >> /etc/profile | |
ENV ANDROID_SDK_COMPONENTS tools,platform-tools,build-tools-19.1.0,build-tools-22.0.1,build-tools-21.1.2,build-tools-22.0.0,android-21,android-22,extra-android-m2repository,extra-google-m2repository,android-23,build-tools-23.0.0,build-tools-23.0.1,build-tools-23.0.2 | |
RUN echo y | android update sdk --no-ui --all --filter "${ANDROID_SDK_COMPONENTS}" | |
ENV TERM dumb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM saymagic/androidbuilder:v1.0 | |
MAINTAINER saymagic <saymagic.dev@gmail.com> | |
ENV PROJECT /project | |
RUN mkdir $PROJECT | |
WORKDIR $PROJECT | |
ADD . $PROJECT | |
RUN chmod +x ./gradlew | |
RUN echo "sdk.dir=$ANDROID_HOME" > local.properties && \ | |
./gradlew --stacktrace app:dependencies | |
CMD ./gradlew --stacktrace check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment