-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (33 loc) · 1.78 KB
/
Dockerfile
File metadata and controls
45 lines (33 loc) · 1.78 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
# when upgrading node versions, get the "Index Digest" for the new version from this URL
# for example, with Node 20.20.1, you'd open this URL in your browser:
# https://hub.docker.com/layers/library/node/20.20.1/images
# ***when upgrading node*** edit this line with the new version and index digest:
FROM node:20.20.1@sha256:e391c5561646193be929e3fe55d27234f40a01d867d72b30ae1341b673a3bf4b
RUN apt-get update && apt-get install -y android-sdk openjdk-17-jdk wget zip
RUN ls /usr/lib/jvm/
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64/
ENV ANDROID_HOME=/usr/lib/android-sdk
ENV PATH=${PATH}:${ANDROID_HOME}/platform-tools
RUN chown 1000 ${ANDROID_HOME} ; chmod g+w ${ANDROID_HOME}
# Install SDK command line tools
WORKDIR ${ANDROID_HOME}
RUN yes | wget -c https://dl.google.com/android/repository/commandlinetools-linux-8092744_latest.zip
RUN unzip commandlinetools-linux-8092744_latest.zip
RUN mv cmdline-tools latest
RUN mkdir cmdline-tools
RUN mv latest cmdline-tools
ENV PATH=${PATH}:${ANDROID_HOME}/cmdline-tools/latest/bin
# Accept SDK licenses
WORKDIR ${ANDROID_HOME}/cmdline-tools/latest/bin
RUN yes | ./sdkmanager --licenses
RUN ./sdkmanager --install "platforms;android-35" "platforms;android-34" "platforms;android-33" "platforms;android-26" "build-tools;35.0.0" "build-tools;34.0.0" "build-tools;33.0.1" "cmake;3.22.1" "platform-tools"
# Install Android NDK
WORKDIR ${ANDROID_HOME}
RUN yes | wget -c https://dl.google.com/android/repository/android-ndk-r28c-linux.zip
RUN unzip android-ndk-r28c-linux.zip
ENV ANDROID_NDK_HOME=/usr/lib/android-sdk/android-ndk-r28c
ENV PATH=${PATH}:${ANDROID_NDK_HOME}
RUN mkdir /home/node/.gradle
RUN chown -R 1000:1000 /home/node/.gradle
RUN echo NDK_PATH=/usr/lib/android-sdk/android-ndk-r28c >> /home/node/.gradle/gradle.properties
WORKDIR /app/packages/mobile