-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (19 loc) · 917 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
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y curl unzip git openjdk-17-jdk
ENV SDK_URL="https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip"
ENV ANDROID_HOME="/usr/local/android-sdk"
ENV ANDROID_SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
RUN mkdir "$ANDROID_HOME" .android && \
cd "$ANDROID_HOME" && \
curl -s -o sdk.zip $SDK_URL && \
unzip -q sdk.zip && \
rm sdk.zip
# Google's distribution of android cmd tools comes with the wrong directory layout, WTF
RUN mv $ANDROID_HOME/cmdline-tools $ANDROID_HOME/temp
RUN mkdir $ANDROID_HOME/cmdline-tools
RUN mv $ANDROID_HOME/temp $ANDROID_HOME/cmdline-tools/latest
RUN yes | $ANDROID_SDKMANAGER --licenses
RUN $ANDROID_SDKMANAGER "tools" "platform-tools"
RUN $ANDROID_SDKMANAGER "build-tools;34.0.0"
RUN $ANDROID_SDKMANAGER "platforms;android-34"
RUN yes | $ANDROID_SDKMANAGER --licenses