From a7b4f463e4ffc282814ef74daf18c74581fc3a7d Mon Sep 17 00:00:00 2001 From: aguestuser Date: Mon, 17 Apr 2017 00:34:21 -0400 Subject: [ag] Update dockerfile to match config in passing local build * PROBLEM: the build fails on gitlab in a debian-based docker container * BUT: i (@aguestuser) have a recently-achieved passing build on a debian laptop * ATTEMPTED SOLUTION: construct a dockerfile that matches my local configuration as precisely as possible * PROGRESS: the build gets further than it did before -- getting part of the way through the `buildNative` gradle script before failing * REMAINING FAILURE: several arm64 cross-compile steps in the `ndk-build` step fail because they depend on [neon](https://developer.android.com/ndk/guides/cpu-arm-neon.html): ```shell [arm64-v8a] Compile : crypto_static <= aesv8-armx-64.S openssl/crypto/aes/asm/aesv8-armx-64.S:35:2: error: instruction requires: neon eor v0.16b,v0.16b,v0.16b ^ openssl/crypto/aes/asm/aesv8-armx-64.S:36:2: error: instruction requires: neon ld1 {v3.16b},[x0],#16 ^ openssl/crypto/aes/asm/aesv8-armx-64.S:38:2: error: instruction requires: neon ld1 {v1.4s,v2.4s},[x3],#32 ``` * PROPOSED NEXT STEPS: * consult team to see if there's any collective wisdom about `neon` * look for ways to analyze diff of c dependencies in local machine v. docker instance * consider using ubuntu or debian:sid as the base image for the android container? --- docker/android-sdk.dockerfile | 91 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 docker/android-sdk.dockerfile (limited to 'docker') diff --git a/docker/android-sdk.dockerfile b/docker/android-sdk.dockerfile new file mode 100644 index 00000000..dddf54c6 --- /dev/null +++ b/docker/android-sdk.dockerfile @@ -0,0 +1,91 @@ +FROM debian:stretch + +MAINTAINER LEAP Encryption Access Project +LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="0.0.1" + +# ------------------------------------------------------ +# --- Install System Dependencies + +# Update Debian +RUN apt-get update -qq + +# Install Debian Packages +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ + # the basics + wget unzip git locales \ + # java stuff + openjdk-8-jdk maven \ + # c libraries + make clang lib32stdc++6 lib32z1 # (incl. 32-bit compatible versions) + +# libgcc-6-dev-arm64-cross + +# Set Locale +RUN locale-gen en_US.UTF-8 +RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 + +# ------------------------------------------------------ +# --- Install Android SDK Tools + +ENV ANDROID_HOME /opt/android-sdk-linux +ENV SDK_TOOLS_VERSION "25.2.5" + +# Install SDK Tools +RUN cd /opt \ + && wget -q -O sdk-tools.zip \ + https://dl.google.com/android/repository/tools_r${SDK_TOOLS_VERSION}-linux.zip \ + && unzip -q sdk-tools.zip -d ${ANDROID_HOME} \ + && rm -f sdk-tools.zip + +# Update PATH +ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools + +# Install Platform Tools Package +RUN echo y | sdkmanager "platform-tools" # echo y to accept google licenses + +# Install Android Support Repositories +RUN echo y | sdkmanager "extras;android;m2repository" + +# Install Target SDK Packages (Please keep in descending order) +RUN echo y | sdkmanager "platforms;android-25" +RUN echo y | sdkmanager "platforms;android-24" +RUN echo y | sdkmanager "platforms;android-23" + +# Install Build Tools (Please keep in descending order) +RUN echo y | sdkmanager "build-tools;25.0.2" +RUN echo y | sdkmanager "build-tools;24.0.3" +RUN echo y | sdkmanager "build-tools;23.0.3" + +# ------------------------------------------------------ +# --- Install Android NDK (for running C code) + +ENV ANDROID_NDK_HOME ${ANDROID_HOME}/ndk-bundle + +# Install NDK packages from sdk tools + +RUN echo y | sdkmanager "ndk-bundle" +RUN echo y | sdkmanager "cmake;3.6.3155560" +RUN echo y | sdkmanager "lldb;2.3" + +# Update PATH + +ENV PATH ${PATH}:${ANDROID_NDK_HOME} + + +# ------------------------------------------------------ +# --- Install Android Emulator + + +# RUN echo y | sdkmanager "emulator" + +# System Images for emulators +# RUN echo y | sdkmanager "system-images;android-25;google_apis;armeabi-v7a" +# RUN echo y | sdkmanager "system-images;android-24;google_apis;armeabi-v7a" +# RUN echo y | sdkmanager "system-images;android-23;google_apis;armeabi-v7a" +# RUN echo y | sdkmanager "system-images;android-23;google_apis;arm64-v8a" + +# ------------------------------------------------------ +# --- Cleanup + +RUN apt-get clean + -- cgit v1.2.3 From e79058d8797c918d37e406245ca7683cf07240d1 Mon Sep 17 00:00:00 2001 From: aguestuser Date: Sun, 23 Apr 2017 16:39:03 -0400 Subject: [ag] Fix native build step with revised dockerfile * PROBLEM: * most recent version (r14b) of `android-ndk` uses `clang` for cross-compilation * BUT: `openssl` cannot compile successfully w/ `clang` * AND: we depend on `openssl` transitively through `ics-openvpn` while trying to use `android-ndk` r14b * FIX: * downgrade to `android-ndk` (12b) (most recent versoin that still uses `gcc` instead of `clang`) * modify some of the default * REMAINING PROBLEMS: * some string translations for Jamaica now break the build (unclear why -- outdated country abbreviation? ja for jm???) * we are now using a version of ndk that is 2 versions old and a version of ics-openvpn (pinned to a 3.1.2016 commit via submodule) that depends on an outdated version of `openssl`, which raises security concerns. updating to the most recent version will force us to wade into all the dependency problems amongst `ics-openvpn`/`openssl`/`ndk` * REFERENCES: * on `openssl` incompatibility w/ clang: https://github.com/openssl/openssl/pull/2229 * on `ics-openvpn` problems with `ndk`: https://github.com/android-ndk/ndk/issues/144 --- docker/android-sdk.dockerfile | 86 ++++++++++++++++++++++++++++++------------- 1 file changed, 60 insertions(+), 26 deletions(-) (limited to 'docker') diff --git a/docker/android-sdk.dockerfile b/docker/android-sdk.dockerfile index dddf54c6..31b89d4c 100644 --- a/docker/android-sdk.dockerfile +++ b/docker/android-sdk.dockerfile @@ -3,6 +3,22 @@ FROM debian:stretch MAINTAINER LEAP Encryption Access Project LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="0.0.1" +# ------------------------------------------------------ +# --- Env Vars + + +ENV ANDROID_SDK_VERSION "25.2.5" +ENV ANDROID_NDK_VERSION "r12b" + +# NOTE(@aguestuser|4.23.17) +# We woud like to use te current version of Android NDK () + +ENV ANDROID_HOME /opt/android-sdk-linux +ENV ANDROID_NDK_HOME ${ANDROID_HOME}/android-ndk-${ANDROID_NDK_VERSION} + +ENV ANDROID_SDK_URL https://dl.google.com/android/repository/tools_r${ANDROID_SDK_VERSION}-linux.zip +ENV ANDROID_NDK_URL http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip + # ------------------------------------------------------ # --- Install System Dependencies @@ -12,13 +28,11 @@ RUN apt-get update -qq # Install Debian Packages RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ # the basics - wget unzip git locales \ + curl unzip git locales \ # java stuff openjdk-8-jdk maven \ # c libraries - make clang lib32stdc++6 lib32z1 # (incl. 32-bit compatible versions) - -# libgcc-6-dev-arm64-cross + make gcc lib32stdc++6 lib32z1 # (incl. 32-bit compatible versions) # Set Locale RUN locale-gen en_US.UTF-8 @@ -27,19 +41,54 @@ RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 # ------------------------------------------------------ # --- Install Android SDK Tools -ENV ANDROID_HOME /opt/android-sdk-linux -ENV SDK_TOOLS_VERSION "25.2.5" # Install SDK Tools -RUN cd /opt \ - && wget -q -O sdk-tools.zip \ - https://dl.google.com/android/repository/tools_r${SDK_TOOLS_VERSION}-linux.zip \ - && unzip -q sdk-tools.zip -d ${ANDROID_HOME} \ +RUN curl -L $ANDROID_SDK_URL -o sdk-tools.zip \ + && unzip -q sdk-tools.zip -d $ANDROID_HOME \ && rm -f sdk-tools.zip # Update PATH ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools +# ------------------------------------------------------ +# --- Install Android NDK (for running C code) + +RUN curl -L $ANDROID_NDK_URL -o ndk.zip \ + && unzip ndk.zip -d $ANDROID_HOME \ + && rm -rf ndk.zip + +# HACK (@aguestuser|4.23.17): + +# BUG: +# when installed on a 64-bit machine, ndk r12b +# fails to cross-compile for *some* (not all) target architectures +# because it looks for prebuilt packages in /prebuilt/linux-x86 +# instead of /prebuilt/linux-x86_64 (which is where it installed them) + +# PENDING: +# (1) a cleaner solution +# (2) upgrading to ndk r14b (pending openssl/clang bugfix: https://github.com/openssl/openssl/pull/2229) + +# WORKAROUND: +# we simply rename all such directories so the cross-compiler can find them + +ENV TARGETS "aarch64-linux-android-4.9 \ + arm-linux-androideabi-4.9 \ + mipsel-linux-android-4.9 \ + x86-4.9 \ + x86_64-4.9" + +RUN for target in $TARGETS; do \ + cd ${ANDROID_NDK_HOME}/toolchains/${target}/prebuilt \ + && mv linux-x86_64/ linux-x86/; \ + done + +ENV PATH ${PATH}:${ANDROID_NDK_HOME} + +# ------------------------------------------------------ +# --- Install Android SDK Tools Packages + + # Install Platform Tools Package RUN echo y | sdkmanager "platform-tools" # echo y to accept google licenses @@ -53,25 +102,10 @@ RUN echo y | sdkmanager "platforms;android-23" # Install Build Tools (Please keep in descending order) RUN echo y | sdkmanager "build-tools;25.0.2" +RUN echo y | sdkmanager "build-tools;25.0.0" RUN echo y | sdkmanager "build-tools;24.0.3" RUN echo y | sdkmanager "build-tools;23.0.3" -# ------------------------------------------------------ -# --- Install Android NDK (for running C code) - -ENV ANDROID_NDK_HOME ${ANDROID_HOME}/ndk-bundle - -# Install NDK packages from sdk tools - -RUN echo y | sdkmanager "ndk-bundle" -RUN echo y | sdkmanager "cmake;3.6.3155560" -RUN echo y | sdkmanager "lldb;2.3" - -# Update PATH - -ENV PATH ${PATH}:${ANDROID_NDK_HOME} - - # ------------------------------------------------------ # --- Install Android Emulator -- cgit v1.2.3 From 215edb9840e5a75ed961fbf8b6ce423116deef28 Mon Sep 17 00:00:00 2001 From: aguestuser Date: Sun, 23 Apr 2017 20:36:37 -0400 Subject: [ag] eliminate hacky workaround for 64-bit builds * HACK: replace all toolchain references to `linux-x86_64` with `linux-x86` * FIX: provide dependency on `file` package that will allow `ndk-build` to detect 32-bit userland, making this * side-effects: * group sdk/env vars with installation code that uses them * add explanatory note about why we use outdated version of `android-ndk` ------------------ *Explanation:* More careful analysis of the meaning of the word `file` in this (subtle!) error message: ```shell /opt/android-sdk-linux/android-ndk-r12b/build/ndk-build: 143: /opt/android-sdk-linux/android-ndk-r12b/build/ndk-build: file: not found ``` led to inspecting line 143 of `ndk-build`, revealing an undefined variable called `file` that would allow `ndk-build` to detect a 32-bit userland: ```shell file -L "$SHELL" | grep -q "x86[_-]64" ``` Thus the error messsage was *not* trying to tell us that a file could not be found, but that the program called `file` could not be found. FUN! :) --- docker/android-sdk.dockerfile | 61 ++++++++++++------------------------------- 1 file changed, 17 insertions(+), 44 deletions(-) (limited to 'docker') diff --git a/docker/android-sdk.dockerfile b/docker/android-sdk.dockerfile index 31b89d4c..468546cf 100644 --- a/docker/android-sdk.dockerfile +++ b/docker/android-sdk.dockerfile @@ -3,22 +3,6 @@ FROM debian:stretch MAINTAINER LEAP Encryption Access Project LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="0.0.1" -# ------------------------------------------------------ -# --- Env Vars - - -ENV ANDROID_SDK_VERSION "25.2.5" -ENV ANDROID_NDK_VERSION "r12b" - -# NOTE(@aguestuser|4.23.17) -# We woud like to use te current version of Android NDK () - -ENV ANDROID_HOME /opt/android-sdk-linux -ENV ANDROID_NDK_HOME ${ANDROID_HOME}/android-ndk-${ANDROID_NDK_VERSION} - -ENV ANDROID_SDK_URL https://dl.google.com/android/repository/tools_r${ANDROID_SDK_VERSION}-linux.zip -ENV ANDROID_NDK_URL http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip - # ------------------------------------------------------ # --- Install System Dependencies @@ -31,8 +15,8 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ curl unzip git locales \ # java stuff openjdk-8-jdk maven \ - # c libraries - make gcc lib32stdc++6 lib32z1 # (incl. 32-bit compatible versions) + # ndk dependencies + make gcc file lib32stdc++6 lib32z1 # (incl. 32-bit compatible versions) # Set Locale RUN locale-gen en_US.UTF-8 @@ -41,6 +25,9 @@ RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 # ------------------------------------------------------ # --- Install Android SDK Tools +ENV ANDROID_SDK_VERSION "25.2.5" +ENV ANDROID_HOME /opt/android-sdk-linux +ENV ANDROID_SDK_URL https://dl.google.com/android/repository/tools_r${ANDROID_SDK_VERSION}-linux.zip # Install SDK Tools RUN curl -L $ANDROID_SDK_URL -o sdk-tools.zip \ @@ -53,36 +40,22 @@ ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME} # ------------------------------------------------------ # --- Install Android NDK (for running C code) +# NOTE(@aguestuser|4.23.17) +# We woud like to use te current version of Android NDK (r14b) but cannot +# due to pinned dependency on year-old version of `ics-openvpn` +# which has transitive dependency on `openssl` which will not compile with `clang` +# (starting in 13b, android ndk uses `clang` isntead of `gcc`) +# Upon rebasing onto to current HEAD of `ics-openvpn` and resolving conflicts, we +# should update to current version of `ndk` (if possible). + +ENV ANDROID_NDK_VERSION "r12b" +ENV ANDROID_NDK_HOME ${ANDROID_HOME}/android-ndk-${ANDROID_NDK_VERSION} +ENV ANDROID_NDK_URL http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip + RUN curl -L $ANDROID_NDK_URL -o ndk.zip \ && unzip ndk.zip -d $ANDROID_HOME \ && rm -rf ndk.zip -# HACK (@aguestuser|4.23.17): - -# BUG: -# when installed on a 64-bit machine, ndk r12b -# fails to cross-compile for *some* (not all) target architectures -# because it looks for prebuilt packages in /prebuilt/linux-x86 -# instead of /prebuilt/linux-x86_64 (which is where it installed them) - -# PENDING: -# (1) a cleaner solution -# (2) upgrading to ndk r14b (pending openssl/clang bugfix: https://github.com/openssl/openssl/pull/2229) - -# WORKAROUND: -# we simply rename all such directories so the cross-compiler can find them - -ENV TARGETS "aarch64-linux-android-4.9 \ - arm-linux-androideabi-4.9 \ - mipsel-linux-android-4.9 \ - x86-4.9 \ - x86_64-4.9" - -RUN for target in $TARGETS; do \ - cd ${ANDROID_NDK_HOME}/toolchains/${target}/prebuilt \ - && mv linux-x86_64/ linux-x86/; \ - done - ENV PATH ${PATH}:${ANDROID_NDK_HOME} # ------------------------------------------------------ -- cgit v1.2.3 From 7ed71d793c24b0b074cf61a85ea96c45c21f07f1 Mon Sep 17 00:00:00 2001 From: aguestuser Date: Sun, 30 Apr 2017 15:35:42 -0400 Subject: [ag] generate all locales in android-sdk dockerfile to pass build --- docker/android-sdk.dockerfile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'docker') diff --git a/docker/android-sdk.dockerfile b/docker/android-sdk.dockerfile index 468546cf..753ac6a9 100644 --- a/docker/android-sdk.dockerfile +++ b/docker/android-sdk.dockerfile @@ -18,9 +18,16 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ # ndk dependencies make gcc file lib32stdc++6 lib32z1 # (incl. 32-bit compatible versions) -# Set Locale -RUN locale-gen en_US.UTF-8 +# ------------------------------------------------------ +# --- Set Locales + +# Generate All Locales +RUN cp /usr/share/i18n/SUPPORTED /etc/locale.gen +RUN locale-gen + +# Set Default Locale RUN localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 +ENV LANG en_US.UTF-8 # ------------------------------------------------------ # --- Install Android SDK Tools -- cgit v1.2.3 From 690364e6debe88ae052d93808d715b9ac79d4bc1 Mon Sep 17 00:00:00 2001 From: aguestuser Date: Sun, 30 Apr 2017 17:09:41 -0400 Subject: [ag] extract sdk, ndk, emulator configs to separate dockerfiles --- docker/android-emulator.dockerfile | 24 ++++++++++++++++++++ docker/android-ndk.dockerfile | 32 ++++++++++++++++++++++++++ docker/android-sdk.dockerfile | 46 +++----------------------------------- 3 files changed, 59 insertions(+), 43 deletions(-) create mode 100644 docker/android-emulator.dockerfile create mode 100644 docker/android-ndk.dockerfile (limited to 'docker') diff --git a/docker/android-emulator.dockerfile b/docker/android-emulator.dockerfile new file mode 100644 index 00000000..0201312b --- /dev/null +++ b/docker/android-emulator.dockerfile @@ -0,0 +1,24 @@ +FROM 0xacab.org:4567/leap/bitmask_android/android-sdk:latest + +MAINTAINER LEAP Encryption Access Project +LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="25" + +# ------------------------------------------------------ +# --- System Dependencies + +# ensure GL compatibility + +RUN apt-get update -qq +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y mesa-utils +ENV ANDROID_EMULATOR_USE_SYSTEM_LIBS=1 + +# ------------------------------------------------------ +# --- Install Android Emulator + +# Install Android SDK emulator package +RUN echo y | sdkmanager "emulator" + +# Install System Images for emulators +RUN echo y | sdkmanager "system-images;android-25;google_apis;x86_64" +RUN echo y | sdkmanager "system-images;android-24;google_apis;x86_64" +RUN echo y | sdkmanager "system-images;android-23;google_apis;x86_64" diff --git a/docker/android-ndk.dockerfile b/docker/android-ndk.dockerfile new file mode 100644 index 00000000..0a3eabfd --- /dev/null +++ b/docker/android-ndk.dockerfile @@ -0,0 +1,32 @@ +FROM 0xacab.org:4567/leap/bitmask_android/android-sdk:latest + +MAINTAINER LEAP Encryption Access Project +LABEL Description="Android NDK image based on android-sdk baseimage" Vendor="LEAP" Version="r12b" + +# ------------------------------------------------------ +# --- Install System Dependencies + +RUN apt-get update -qq +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ + make gcc file lib32stdc++6 lib32z1 # JNI build dependencies w/ 32-bit compatible C libs + +# ------------------------------------------------------ +# --- Install Android NDK (for running C code) + +# NOTE(@aguestuser|4.23.17) +# We woud like to use te current version of Android NDK (r14b) but cannot +# due to pinned dependency on year-old version of `ics-openvpn` +# which has transitive dependency on `openssl` which will not compile with `clang` +# (starting in 13b, android ndk uses `clang` isntead of `gcc`) +# Upon rebasing onto to current HEAD of `ics-openvpn` and resolving conflicts, we +# should update to current version of `ndk`. + +ENV ANDROID_NDK_VERSION "r12b" +ENV ANDROID_NDK_HOME ${ANDROID_HOME}/android-ndk-${ANDROID_NDK_VERSION} +ENV ANDROID_NDK_URL http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip + +RUN curl -L $ANDROID_NDK_URL -o ndk.zip \ + && unzip ndk.zip -d $ANDROID_HOME \ + && rm -rf ndk.zip + +ENV PATH ${PATH}:${ANDROID_NDK_HOME} diff --git a/docker/android-sdk.dockerfile b/docker/android-sdk.dockerfile index 753ac6a9..1007735d 100644 --- a/docker/android-sdk.dockerfile +++ b/docker/android-sdk.dockerfile @@ -1,22 +1,17 @@ FROM debian:stretch MAINTAINER LEAP Encryption Access Project -LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="0.0.1" +LABEL Description="Android SDK baseimage based on debian:stretch" Vendor="LEAP" Version="25.2.5" # ------------------------------------------------------ # --- Install System Dependencies -# Update Debian RUN apt-get update -qq - -# Install Debian Packages RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ # the basics curl unzip git locales \ # java stuff - openjdk-8-jdk maven \ - # ndk dependencies - make gcc file lib32stdc++6 lib32z1 # (incl. 32-bit compatible versions) + openjdk-8-jdk maven # ------------------------------------------------------ # --- Set Locales @@ -44,31 +39,9 @@ RUN curl -L $ANDROID_SDK_URL -o sdk-tools.zip \ # Update PATH ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools -# ------------------------------------------------------ -# --- Install Android NDK (for running C code) - -# NOTE(@aguestuser|4.23.17) -# We woud like to use te current version of Android NDK (r14b) but cannot -# due to pinned dependency on year-old version of `ics-openvpn` -# which has transitive dependency on `openssl` which will not compile with `clang` -# (starting in 13b, android ndk uses `clang` isntead of `gcc`) -# Upon rebasing onto to current HEAD of `ics-openvpn` and resolving conflicts, we -# should update to current version of `ndk` (if possible). - -ENV ANDROID_NDK_VERSION "r12b" -ENV ANDROID_NDK_HOME ${ANDROID_HOME}/android-ndk-${ANDROID_NDK_VERSION} -ENV ANDROID_NDK_URL http://dl.google.com/android/repository/android-ndk-${ANDROID_NDK_VERSION}-linux-x86_64.zip - -RUN curl -L $ANDROID_NDK_URL -o ndk.zip \ - && unzip ndk.zip -d $ANDROID_HOME \ - && rm -rf ndk.zip - -ENV PATH ${PATH}:${ANDROID_NDK_HOME} - # ------------------------------------------------------ # --- Install Android SDK Tools Packages - # Install Platform Tools Package RUN echo y | sdkmanager "platform-tools" # echo y to accept google licenses @@ -86,20 +59,7 @@ RUN echo y | sdkmanager "build-tools;25.0.0" RUN echo y | sdkmanager "build-tools;24.0.3" RUN echo y | sdkmanager "build-tools;23.0.3" -# ------------------------------------------------------ -# --- Install Android Emulator - - -# RUN echo y | sdkmanager "emulator" - -# System Images for emulators -# RUN echo y | sdkmanager "system-images;android-25;google_apis;armeabi-v7a" -# RUN echo y | sdkmanager "system-images;android-24;google_apis;armeabi-v7a" -# RUN echo y | sdkmanager "system-images;android-23;google_apis;armeabi-v7a" -# RUN echo y | sdkmanager "system-images;android-23;google_apis;arm64-v8a" - # ------------------------------------------------------ # --- Cleanup -RUN apt-get clean - +RUN apt clean -- cgit v1.2.3 From 730ab74a2a38cdbe8ac735f2d641d3d19055bf34 Mon Sep 17 00:00:00 2001 From: aguestuser Date: Sun, 30 Apr 2017 19:03:59 -0400 Subject: [ag] modify sdk dockerfile to ensure android-23 platform installs * on remote builds, failure of Android SDK Platform 23 to properly install was causing build failures undetected in local container. see: * to fix this, tweak order of `sdkmanager` calls and remove `echo -y` flags to ensure platform installation completes successfully and build step never tries to install Platform 23 --- docker/android-sdk.dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'docker') diff --git a/docker/android-sdk.dockerfile b/docker/android-sdk.dockerfile index 1007735d..4044a7ec 100644 --- a/docker/android-sdk.dockerfile +++ b/docker/android-sdk.dockerfile @@ -46,18 +46,18 @@ ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME} RUN echo y | sdkmanager "platform-tools" # echo y to accept google licenses # Install Android Support Repositories -RUN echo y | sdkmanager "extras;android;m2repository" - -# Install Target SDK Packages (Please keep in descending order) -RUN echo y | sdkmanager "platforms;android-25" -RUN echo y | sdkmanager "platforms;android-24" -RUN echo y | sdkmanager "platforms;android-23" +RUN sdkmanager "extras;android;m2repository" # Install Build Tools (Please keep in descending order) -RUN echo y | sdkmanager "build-tools;25.0.2" -RUN echo y | sdkmanager "build-tools;25.0.0" -RUN echo y | sdkmanager "build-tools;24.0.3" -RUN echo y | sdkmanager "build-tools;23.0.3" +RUN sdkmanager "build-tools;25.0.2" +RUN sdkmanager "build-tools;25.0.0" +RUN sdkmanager "build-tools;24.0.3" +RUN sdkmanager "build-tools;23.0.3" + +# Install Target SDK Packages (Please keep in descending order) +RUN sdkmanager "platforms;android-25" +RUN sdkmanager "platforms;android-24" +RUN sdkmanager "platforms;android-23" # ------------------------------------------------------ # --- Cleanup -- cgit v1.2.3