-
-
Notifications
You must be signed in to change notification settings - Fork 147
/
Dockerfile
44 lines (35 loc) · 1.39 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
FROM docker.io/ubuntu:18.04
# Install Android Studio requirements
# See https://developer.android.com/studio/install#linux
RUN apt-get update -y \
&& apt-get install -y --no-install-recommends \
wget \
curl \
unzip \
openjdk-11-jre \
file \
build-essential \
&& rm -rf /var/lib/apt/lists/*
ARG USER=deltachat
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID -o $USER
RUN useradd -m -u $UID -g $GID -o $USER
USER $USER
ENV ANDROID_SDK_ROOT /home/${USER}/android-sdk
RUN mkdir ${ANDROID_SDK_ROOT}
WORKDIR $ANDROID_SDK_ROOT
RUN wget -q https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip && \
unzip commandlinetools-linux-8512546_latest.zip && \
rm commandlinetools-linux-8512546_latest.zip
RUN yes | ${ANDROID_SDK_ROOT}/cmdline-tools/bin/sdkmanager --sdk_root=${ANDROID_SDK_ROOT} --licenses
ENV PATH ${PATH}:${ANDROID_SDK_ROOT}/cmdline-tools/bin
# Install NDK manually. Other SDK parts are installed automatically by gradle.
#
# If you change the NDK version here, also change it in `flake.nix`.
# NDK version r23c LTS aka 23.2.8568313
RUN sdkmanager --sdk_root=${ANDROID_SDK_ROOT} 'ndk;23.2.8568313'
ENV ANDROID_NDK_ROOT ${ANDROID_SDK_ROOT}/ndk/23.2.8568313
ENV PATH ${PATH}:${ANDROID_NDK_ROOT}/toolchains/llvm/prebuilt/linux-x86_64/bin/
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none
ENV PATH ${PATH}:/home/${USER}/.cargo/bin