aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Carlier <[email protected]>2019-07-14 16:40:33 +0100
committerDavid Carlier <[email protected]>2019-07-14 16:40:33 +0100
commit761b1d30937c8cf6c2dc2e16c507129fd3a5314b (patch)
tree1eb8f911a7abc7f1379cb16725d76f27209f7a01
parent3a3146b505400eda327dfe532ec583dee3ab092c (diff)
Update of docker android build.
Using direct image with more modern NDK.
-rw-r--r--src/scripts/Dockerfile.android12
-rwxr-xr-xsrc/scripts/docker-android.sh3
2 files changed, 8 insertions, 7 deletions
diff --git a/src/scripts/Dockerfile.android b/src/scripts/Dockerfile.android
index b55abf63b..124d5d4f6 100644
--- a/src/scripts/Dockerfile.android
+++ b/src/scripts/Dockerfile.android
@@ -1,17 +1,17 @@
-FROM debian:stretch AS debian
-ARG ANDORID_SDK_VER
+FROM devnexen/android-ndk:r20 AS android-ndk
ARG ANDROID_ARCH
ARG ANDROID_TOOLCHAIN_SUF
-RUN apt-get update && apt-get -y --no-install-recommends install make
+ARG ANDROID_ARCH_SUF
+ARG ANDROID_SDK_VER
+RUN apt-get update && apt-get install -y --no-install-recommends python
RUN mkdir -p /botan/android
WORKDIR /botan
-COPY --from=bitriseio/android-ndk /opt/android-ndk android-ndk
COPY configure.py configure.py
COPY src src
COPY doc doc
COPY license.txt license.txt
COPY news.rst news.rst
-ENV PATH=$PATH:android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/
-RUN ./configure.py --prefix=android/arm --os=android --cpu=${ANDROID_ARCH} --cc=clang --cc-bin=armv7a-linux-android${ANDROID_TOOLCHAIN_SUF}${SDK}-clang++ --ar-command=arm-linux-android${ANDROID_TOOLCHAIN_SUF}-ar
+ENV PATH=$PATH:/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/
+RUN ./configure.py --prefix=android/arm --os=android --cpu=${ANDROID_ARCH} --cc=clang --cc-bin=${ANDROID_ARCH}${ANDROID_ARCH_SUF}-linux-android${ANDROID_TOOLCHAIN_SUF}${ANDROID_SDK_VER}-clang++ --ar-command=${ANDROID_ARCH}${ANDROID_ARCH_SUF}-linux-android${ANDROID_TOOLCHAIN_SUF}-ar
RUN make -j`getconf _NPROCESSORS_ONLN`
RUN make install
diff --git a/src/scripts/docker-android.sh b/src/scripts/docker-android.sh
index eb7becd7b..22bbc41f4 100755
--- a/src/scripts/docker-android.sh
+++ b/src/scripts/docker-android.sh
@@ -1,8 +1,9 @@
VERSION=`./configure.py --version`
mkdir -p docker-builds
docker build -f src/scripts/Dockerfile.android --force-rm -t botan-android-${VERSION} \
- --build-arg ANDROID_SDK_VER=${ANDROID_SDK_VER} \
--build-arg ANDROID_ARCH=${ANDROID_ARCH} \
+ --build-arg ANDROID_ARCH_SUF=${ANDROID_ARCH_SUF} \
+ --build-arg ANDROID_SDK_VER=${ANDROID_SDK_VER} \
--build-arg ANDROID_TOOLCHAIN_SUF=${ANDROID_TOOLCHAIN_SUF} \
.
docker create --name botan-android-${VERSION} botan-android-${VERSION}