-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (51 loc) · 2.59 KB
/
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Ubuntu 20.04 is OS expo use in cloud to build the apps.
FROM ubuntu:20.04
LABEL maintainer="[email protected]"
ENV DEBIAN_FRONTEND=noninteractive
# Update the package list and install dependencies
RUN apt-get update && \
apt-get install -y \
curl \
gnupg
# Add NodeSource APT repository for Node.js
RUN curl -sL https://deb.nodesource.com/setup_20.x | bash -
# Install Node.js (include)
RUN apt-get install -y nodejs
# Install yarn (optional)
RUN npm install -g yarn
# Install expo dependencies
RUN npm install -g eas-cli
RUN npm install -g sharp-cli
# Install git (eas-cli require git, but you can disable it setting `EAS_NO_VCS=1`)
RUN apt-get -y install git
# Setup folder to store the expo apps
RUN mkdir -p /home/expo_apps/
# Install android studio and java dependencies
RUN dpkg --add-architecture i386
RUN apt-get update && apt-get install -y
RUN apt-get install -y build-essential wget unzip make sudo
RUN apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
RUN apt-get install -y libxrender1 libxtst6 libxi6 libfreetype6 libxft2 xz-utils
RUN apt-get install -y qemu qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils libnotify4 libglu1-mesa libqt5widgets5
RUN apt-get install -y openjdk-17-jdk xvfb
# Get SDK tools (link from https://developer.android.com/studio/index.html#downloads)
RUN wget https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
RUN tar xf android-sdk*-linux.tgz
# Get NDK (https://developer.android.com/ndk/downloads/index.html)
RUN wget https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip
RUN unzip android-ndk*.zip
RUN wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
RUN unzip commandlinetools-linux-9477386_latest.zip
RUN sudo /android-sdk-linux/tools/android update sdk --no-ui
RUN sudo /android-sdk-linux/tools/android update sdk --all --no-ui --filter $(seq -s, 27)
RUN echo 'export ANDROID_HOME=/android-sdk-linux' >> ~/.bashrc
RUN echo 'export ANDROID_SDK_ROOT=/android-sdk-linux' >> ~/.bashrc
RUN echo 'export PATH=$PATH:/tools:$ANDROID_HOME/platform-tools' >> ~/.bashrc
RUN echo 'export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64' >> ~/.bashrc
RUN echo 'export ANDROID_NDK_HOME=/android-ndk-r12b' >> ~/.bashrc
RUN . ~/.bashrc
RUN echo y | /android-sdk-linux/tools/android update sdk --all --filter build-tools-21.1.0 --no-ui
RUN yes | /cmdline-tools/bin/sdkmanager --licenses --sdk_root=/android-sdk-linux
RUN mkdir ~/.gradle
RUN echo 'org.gradle.daemon=true' >> ~/.gradle/gradle.properties
RUN echo 'org.gradle.parallel=true' >> ~/.gradle/gradle.properties