summaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorkwadronaut <kwadronaut@autistici.org>2023-02-23 11:31:39 +0100
committerkwadronaut <kwadronaut@autistici.org>2023-02-23 11:31:39 +0100
commit3e9b1d2d30080939257ec382c49a6294bae3f65a (patch)
tree850831006bd3904474a0a0420f7d4c6e66ef67ef /docker
parentf756c4e3027838e54b177695619ef5460aca2fd6 (diff)
Add screengrab docker and ci
Still some issues on language change and virtual screens Basics are there.
Diffstat (limited to 'docker')
-rw-r--r--docker/android-fastlane/Dockerfile89
1 files changed, 89 insertions, 0 deletions
diff --git a/docker/android-fastlane/Dockerfile b/docker/android-fastlane/Dockerfile
new file mode 100644
index 00000000..07240c21
--- /dev/null
+++ b/docker/android-fastlane/Dockerfile
@@ -0,0 +1,89 @@
+FROM registry.0xacab.org/leap/bitmask_android/android-sdk:latest
+
+MAINTAINER LEAP Encryption Access Project <info@leap.se>
+LABEL Description="Android emulator image based on android-sdk" Vendor="LEAP" Version="2"
+
+# Make sure debconf doesn't complain about lack of interactivity
+ENV DEBIAN_FRONTEND noninteractive
+# ensure GL compatibility
+ENV ANDROID_EMULATOR_USE_SYSTEM_LIBS=1
+
+# ------------------------------------------------------
+# --- System Dependencies
+
+# Need docker package in order to do Docker-in-Docker (DIND)
+RUN lsb_release -a
+
+RUN apt-get update -qq && \
+ apt-get -y dist-upgrade && \
+ apt-get -y install gnupg apt-transport-https
+
+# Docker apt details should be inherited from android_sdk
+#RUN curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg && \
+# echo \
+# "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
+# $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+
+# JNI build dependencies w/ 32-bit compatible C libs
+# fastlane dependencies
+
+RUN apt-get update -qq && \
+ apt-get install -y docker-ce docker-ce-cli make gcc swig file lib32stdc++6 lib32z1 \
+ autoconf autogen automake autopoint autotools-dev gettext-base libtool patch pkg-config po4a \
+ curl git openjdk-11-jdk openjdk-11-jre-headless imagemagick libpulse0 po4a \
+ make build-essential ruby-dev imagemagick docker-ce-cli mesa-utils xvfb \
+ libstdc++6 libncurses5 libsdl1.2debian imagemagick libpulse-java libpulse0 libxkbcommon-x11-0 && \
+ apt-get clean && \
+ apt-get autoclean && \
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
+
+# ------------------------------------------------------
+# --- Install Android Emulator
+
+RUN echo "accept all licenses"
+# Accept all licenses
+RUN echo y | sdkmanager --licenses
+RUN sdkmanager --list
+
+# Install Android SDK emulator package
+RUN echo y | sdkmanager "emulator"
+
+# Install System Images for emulators
+# seems like every version has its own quirks
+RUN echo y | sdkmanager "system-images;android-31;google_apis;x86_64"
+#RUN echo y | sdkmanager "system-images;android-27;google_apis;x86"
+#RUN echo y | sdkmanager "system-images;android-25;google_apis;x86_64"
+#RUN echo y | sdkmanager "system-images;android-23;google_apis;x86_64"
+
+# fastlane wants 2 emulators. Starting happens in the scripts
+RUN echo no | avdmanager create avd --force --name testApi31 --abi google_apis/x86_64 --package 'system-images;android-31;google_apis;x86_64'
+# TODO: fastlane has been troublesome for newer versions, need to dive deep to update
+#RUN echo no | avdmanager create avd --force --name testApi27 --abi google_apis/x86_64 --package 'system-images;android-27;google_apis;x86_64'
+#RUN echo no | avdmanager create avd --force --name testApi27-duet --abi google_apis/x86_64 --package 'system-images;android-27;google_apis;x86_64'
+
+# Install Android cmake
+RUN sdkmanager "cmake;3.10.2.4988404"
+
+# Fastlane:
+RUN gem install bundler fastlane
+
+
+###############################################
+
+# this stuff is all just notes... really, don't call it a mess
+# ------------------------------------------------------
+# --- Install Android NDK (for running C code)
+
+#ENV ANDROID_NDK_VERSION "r21e"
+#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
+#ENV ANDROID_SDK_ROOT ${ANDROID_HOME}/latest/cmdline-tools
+#
+#RUN curl -L $ANDROID_NDK_URL -o ndk.zip \
+# && unzip ndk.zip -d $ANDROID_HOME/ndk \
+# && rm -rf ndk.zip
+#RUN cat $ANDROID_HOME/ndk/android-ndk-${ANDROID_NDK_VERSION}/source.properties | \
+# grep Pkg.Revision | cut -d "=" -f 2 | \
+# xargs -I '{}' mv $ANDROID_HOME/ndk/android-ndk-${ANDROID_NDK_VERSION}/ $ANDROID_HOME/ndk/'{}'
+#ENV PATH ${PATH}:${ANDROID_NDK_HOME}
+