-
Notifications
You must be signed in to change notification settings - Fork 4
/
DockerfileAndroid
24 lines (19 loc) · 1002 Bytes
/
DockerfileAndroid
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 jhasse/android-ndk:latest
# LABEL Name=ALPACA Version=0.0.1
# # RUN microdnf remove java-devel
# # RUN microdnf install java-11-openjdk
# # --allowerasing
FROM registry.fedoraproject.org/fedora-minimal:35 AS build
RUN microdnf install unzip ncurses-compat-libs java-devel file git bzip2 patch gcc tar -y
WORKDIR /opt
RUN curl --silent -O https://dl.google.com/android/repository/commandlinetools-linux-6858069_latest.zip
RUN unzip *.zip && mkdir -p sdk/cmdline-tools/ && mv cmdline-tools/ sdk/cmdline-tools/latest
ENV JAVA_HOME /usr
RUN yes | sdk/cmdline-tools/latest/bin/sdkmanager "build-tools;29.0.2" "platforms;android-29" \
"ndk;22.1.7171670"
FROM registry.fedoraproject.org/fedora-minimal:35
COPY --from=build /opt/sdk /opt/sdk
RUN microdnf install java-devel make git cmake ninja-build tar bzip2 patch gcc-c++ unzip -y && microdnf clean all -y
ENV ANDROID_SDK_ROOT /opt/sdk
ENV LANG C.utf8
ENV JAVA_HOME /usr