mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
2a23d0826c
to prevent this problem in the future: https://support.delta.chat/t/building-instruction-on-github-page-arent-working/2081/27 Supersedes #2285, but 1. doesn't require the Readme to be updated the NDK is updated 2. Adapted to the changes to Dockerfile.
45 lines
1.4 KiB
Docker
45 lines
1.4 KiB
Docker
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
|