FROM ghcr.io/cross-rs/aarch64-linux-android:0.2.5 as android FROM ubuntu:22.04 RUN mkdir -p /usr/aarch64-linux-android COPY --from=android /system/ /usr/aarch64-linux-android/system ARG ARCH ENV ARCH="$ARCH" ENV PATH="${PATH}:/rust/bin" ENV RUST_COMPILER_RT_ROOT=/opt/compiler-rt ADD /scripts/install.sh /install.sh ADD /docker/entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh && \ chmod +x /install.sh && \ env ENVFILE=/env.sh /install.sh "${ARCH}" && \ rm -f /install.sh && \ mkdir -p /target && \ apt-get clean autoclean && \ apt-get autoremove --yes && \ rm -rf /var/cache/apt/archives && \ rm -rf /var/lib/apt/lists/* WORKDIR /target ENTRYPOINT ["/entrypoint.sh"] CMD ["/bin/bash"] ENV CC_aarch64_unknown_linux_gnu='aarch64-linux-gnu-gcc' ENV CXX_aarch64_unknown_linux_gnu='aarch64-linux-gnu-g++' ENV AR_aarch64_unknown_linux_gnu='aarch64-linux-gnu-ar' ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER='aarch64-linux-gnu-gcc' ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER='qemu-aarch64 -L /usr/aarch64-linux-gnu' ENV CC_aarch64_unknown_linux_musl='/aarch64-musl.sh' ENV CXX_aarch64_unknown_linux_musl='aarch64-linux-musl-g++' ENV AR_aarch64_unknown_linux_musl='aarch64-linux-musl-ar' ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER='/aarch64-musl.sh' ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUNNER='qemu-aarch64 -L /usr/aarch64-linux-musl' ENV CC_aarch64_linux_android='aarch64-linux-android-gcc' ENV CXX_aarch64_linux_android='aarch64-linux-android-g++' ENV AR_aarch64_linux_android='aarch64-linux-android-ar' ENV CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER='aarch64-linux-android-gcc' ENV CARGO_TARGET_AARCH64_LINUX_ANDROID_RUNNER='qemu-aarch64 -L /usr/aarch64-linux-android' ENV PATH="${PATH}:/android-ndk/bin"