-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.android
32 lines (24 loc) · 1.11 KB
/
Dockerfile.android
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
27
28
29
30
31
32
##
# A basic Android SDK environment.
FROM ghcr.io/blitz3d-ng/env:debian-12 AS build
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y default-jdk-headless
# android
ENV JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
ENV ANDROID_HOME=/opt/android-sdk
ENV PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}:${ANDROID_HOME}/tools
ENV NDK_VERSION=25.1.8937393
ENV ANDROID_NDK=$ANDROID_HOME/ndk/$NDK_VERSION
ENV ANDROID_NDK_HOME=$ANDROID_NDK
ENV BUILD_TOOLS_VERSION=30.0.2
RUN mkdir -p /opt/android-sdk/cmdline-tools && mkdir -p ~/.android && touch ~/.android/repositories.cfg
RUN cd /opt/android-sdk/cmdline-tools && \
wget -q --output-document=sdk-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip && \
unzip sdk-tools.zip && \
rm -f sdk-tools.zip && \
yes | sdkmanager --sdk_root=${ANDROID_HOME} \
"build-tools;$BUILD_TOOLS_VERSION" \
"extras;android;m2repository" "extras;google;m2repository" "extras;google;google_play_services" \
"platforms;android-24" \
"platforms;android-31" \
"ndk;$NDK_VERSION"