From 67c071595a531bae1a7e588b4c4f0dc1660e2bb0 Mon Sep 17 00:00:00 2001 From: Michel Heily Date: Sat, 5 Jun 2021 20:26:48 +0300 Subject: [PATCH] Add Dockerfile for android targets Former-commit-id: 97d399e200cef304b1d76b099d7449b4a8f33a0b Former-commit-id: 842c1a99e6ac83f4caf90560167b8ddb57c8c93d --- Dockerfile.android | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Dockerfile.android diff --git a/Dockerfile.android b/Dockerfile.android new file mode 100644 index 0000000..70c10b2 --- /dev/null +++ b/Dockerfile.android @@ -0,0 +1,34 @@ +FROM npetrovsky/docker-android-sdk-ndk + +# Update default packages +RUN apt-get update + +# Get Ubuntu packages +RUN apt-get install -y \ + build-essential \ + curl + +# Update new packages +RUN apt-get update + +# Get Rust +RUN curl https://sh.rustup.rs -sSf | bash -s -- -y + +RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc + +RUN . $HOME/.cargo/env && rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android + +ENV NDK=$ANDROID_HOME/ndk-bundle + +RUN echo \ + '[target.aarch64-linux-android]\n'\ + 'ar = "/opt/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/ar "\n'\ + 'linker = "/opt/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android26-clang"\n'\ + \ + '[target.armv7-linux-androideabi]\n'\ + 'ar = "/opt/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/arm-linux-androideabi/bin/ar "\n'\ + 'linker = "/opt/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi26-clang"\n'\ + \ + '[target.i686-linux-android]\n'\ + 'ar = "/opt/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/i386-linux-android/bin/ar"\n'\ + 'linker = "/opt/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android26-clang"' > $HOME/.cargo/config