-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.builder
46 lines (31 loc) · 1.31 KB
/
Dockerfile.builder
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
#docker build -f Dockerfile.builder . -t easbuilder
#docker run -it -e EXPO_TOKEN= -v "$(pwd)":/builder easbuilder <eas profile for building>
FROM ubuntu:22.04
RUN echo '\
Acquire::Retries "100";\
Acquire::https::Timeout "240";\
Acquire::http::Timeout "240";\
APT::Get::Assume-Yes "true";\
APT::Install-Recommends "false";\
APT::Install-Suggests "false";\
Debug::Acquire::https "true";\
' > /etc/apt/apt.conf.d/99custom
RUN apt-get update && \
apt-get install -y openjdk-17-jdk android-sdk android-sdk-platform-23 sdkmanager curl git && \
apt-get clean
# Install Node.js 20.x
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
apt-get clean
RUN npm i --global eas-cli-local-build-plugin expo-cli eas-cli
COPY scripts/build-android.sh /usr/local/bin/build-android
RUN git config --global --add safe.directory /builder
ENV ANDROID_HOME /usr/lib/android-sdk
RUN sdkmanager --install "build-tools;29.0.3" "ndk-bundle;r26" "ndk;26.1.10909125" "platforms;android-35" "tools;26.1.1"
# RUN yes | sdkmanager --licenses
RUN mkdir /builder
WORKDIR /builder
# EAS clones the repository internally, this fails if the repository is not considered as safe
RUN git config --global --add safe.directory /builder/.git
ENV EXPO_TOKEN ""
ENTRYPOINT ["/usr/local/bin/build-android"]