Created
December 1, 2019 14:21
-
-
Save anhnguyen1618/e31b55b194ae2ae0a8b84e08eb5fd3aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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 alpine:3.10 | |
| WORKDIR /application | |
| ENV ANDROID_HOME=/usr/local/android | |
| ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk | |
| ENV SDK_TOOLS_VERSION=sdk-tools-linux-4333796 | |
| ENV PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin | |
| ENV ANDROID_SDK_VERSION=26 | |
| ENV ANDROID_BUILD_TOOLS_VERSION=26.0.3 | |
| RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \ | |
| wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk -O /tmp/glibc.apk && \ | |
| wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-bin-2.30-r0.apk -O /tmp/glibc-bin.apk && \ | |
| apk add --no-cache /tmp/glibc.apk /tmp/glibc-bin.apk && \ | |
| rm -rf /tmp/* && \ | |
| rm -rf /var/cache/apk/* | |
| RUN apk add --no-cache bash | |
| RUN mkdir $ANDROID_HOME | |
| RUN wget -q -O sdk.zip http://dl.google.com/android/repository/$SDK_TOOLS_VERSION.zip && \ | |
| unzip sdk.zip -d $ANDROID_HOME && \ | |
| rm -f sdk.zip | |
| RUN apk add openjdk8 | |
| RUN mkdir "$ANDROID_HOME/licenses" || true \ | |
| && echo "24333f8a63b6825ea9c5514f83c2829b004d1fee" > "$ANDROID_HOME/licenses/android-sdk-license" | |
| RUN sdkmanager "platform-tools" "platforms;android-26" | |
| # && yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment