-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (23 loc) · 972 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM gradle:6.8.3-jre15
USER root
ENV TOOLS_URL="https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip" \
ANDROID_SDK_ROOT="/usr/local/android-sdk" \
ANDROID_SDK=30 \
ANDROID_BUILD_TOOLS=30.0.3 \
PATH="${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin:${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin:${PATH}"
# Download Android SDK
RUN mkdir "$ANDROID_SDK_ROOT" .android "$ANDROID_SDK_ROOT/cmdline-tools" && \
cd "$ANDROID_SDK_ROOT/cmdline-tools" && \
curl -o sdk.zip $TOOLS_URL && \
unzip sdk.zip && \
rm sdk.zip && \
mv cmdline-tools tools && \
yes | $ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager --licenses
# Install Android Build Tools
RUN $ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager --update
RUN $ANDROID_SDK_ROOT/cmdline-tools/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" \
"platforms;android-${ANDROID_SDK}" \
"platform-tools"
# Install xxd
RUN apt-get update && \
apt-get install xxd