Last active
March 13, 2022 08:31
-
-
Save Tulakshana/9ea22a7c9a88341a92c4941ee536e021 to your computer and use it in GitHub Desktop.
Docker steps to install packages using sdkmanager (Android)
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
ENV ANDROID_HOME_DIR=/opt/tools/android-sdk-linux | |
ENV SDK_MANAGER=$ANDROID_HOME/cmdline-tools/bin/sdkmanager | |
ENV TEMP_DIR=<Path to a temporary directory you download files to. e.g. /tmp/install> | |
ENV ANDROID_TOOLS_VERSION=30.0.3 | |
ENV ANDROID_BUILD_VERSION=32 | |
ADD <path to SDK tools. Refer command line tools in https://developer.android.com/studio#downloads> $TEMP_DIR/ | |
RUN mkdir -p $ANDROID_HOME_DIR && \ | |
cd $ANDROID_HOME_DIR && \ | |
unzip $TEMP_DIR/<zip file name downloaded above> && \ | |
rm -rf $TEMP_DIR | |
# Run command sdkmanager --list to find available tools. Documentation: https://developer.android.com/studio/command-line/sdkmanager | |
RUN yes | $SDK_MANAGER \ | |
--licenses \ | |
--sdk_root=$ANDROID_HOME_DIR && \ | |
echo y | $SDK_MANAGER \ | |
"extras;android;m2repository" \ | |
"extras;google;m2repository" \ | |
"tools" \ | |
"extras;google;google_play_services" \ | |
"platform-tools" \ | |
"patcher;v4" \ | |
"platforms;android-$ANDROID_BUILD_VERSION" \ | |
"build-tools;$ANDROID_TOOLS_VERSION" \ | |
--verbose \ | |
--sdk_root=$ANDROID_HOME_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment