Created
May 18, 2023 21:45
-
-
Save cdsap/7b8b220ada657ae3d4a6ed4abdc6edae to your computer and use it in GitHub Desktop.
Docker file buidling Test Distribution Agent + Android SDK
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 gradle/gradle-enterprise-test-distribution-agent:2.0.1 | |
USER 0 | |
RUN apt-get update \ | |
&& apt-get install -y wget \ | |
&& apt-get install -y unzip \ | |
&& rm -rf /var/lib/apt/lists/* | |
USER gradle | |
RUN mkdir -p /home/gradle/android-sdk | |
ENV ANDROID_HOME "/home/gradle/android-sdk" | |
ENV ANDROID_SDK_ROOT $ANDROID_HOME | |
ENV CMDLINE_TOOLS_ROOT "${ANDROID_HOME}/cmdline-tools/latest/bin" | |
ENV ADB_INSTALL_TIMEOUT 120 | |
ENV PATH "${ANDROID_HOME}/emulator:${ANDROID_HOME}/cmdline-tools/latest/bin:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/platform-tools/bin:${PATH}" | |
# You can find the latest command line tools here: https://developer.android.com/studio#command-line-tools-only | |
RUN SDK_TOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip" && \ | |
mkdir -p ${ANDROID_HOME}/cmdline-tools && \ | |
mkdir ${ANDROID_HOME}/platforms && \ | |
mkdir ${ANDROID_HOME}/ndk && \ | |
wget -O /tmp/cmdline-tools.zip -t 5 "${SDK_TOOLS_URL}" && \ | |
unzip -q /tmp/cmdline-tools.zip -d ${ANDROID_HOME}/cmdline-tools && \ | |
rm /tmp/cmdline-tools.zip && \ | |
mv ${ANDROID_HOME}/cmdline-tools/cmdline-tools ${ANDROID_HOME}/cmdline-tools/latest | |
RUN echo y | ${CMDLINE_TOOLS_ROOT}/sdkmanager "tools" && \ | |
echo y | ${CMDLINE_TOOLS_ROOT}/sdkmanager "platform-tools" && \ | |
echo y | ${CMDLINE_TOOLS_ROOT}/sdkmanager "build-tools;34.0.0-rc2" | |
RUN echo y | ${CMDLINE_TOOLS_ROOT}/sdkmanager "platforms;android-UpsideDownCake" && \ | |
echo y | ${CMDLINE_TOOLS_ROOT}/sdkmanager "platforms;android-33" && \ | |
echo y | ${CMDLINE_TOOLS_ROOT}/sdkmanager "platforms;android-32" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment