This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:23.10 | |
ENV ANDROID_HOME="/opt/android-sdk" | |
# support amd64 and arm64 | |
RUN JDK_PLATFORM=$(if [ "$(uname -m)" = "aarch64" ]; then echo "arm64"; else echo "amd64"; fi) && \ | |
echo export JDK_PLATFORM=$JDK_PLATFORM >> /etc/jdk.env && \ | |
echo export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-$JDK_PLATFORM/" >> /etc/jdk.env && \ | |
echo . /etc/jdk.env >> /etc/bash.bashrc && \ | |
echo . /etc/jdk.env >> /etc/profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
$ANDROID_SDK_HOME/emulator/emulator -avd testDevice -no-audio -no-boot-anim -no-window -read-only & | |
echo "Waiting for emulator to launch" | |
timeout 5m adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 5; done;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM android-build:1.0 | |
RUN apt-get update -qq > /dev/null && \ | |
apt-get install -qq locales > /dev/null && \ | |
locale-gen "$LANG" > /dev/null && \ | |
apt-get install -qq --no-install-recommends libpulse0 libxcomposite-dev libxcursor-dev libxdamage-dev cpu-checker | |
ENV PATH="$PATH:$ANDROID_HOME/cmdline-tools/7.0/bin/:$ANDROID_HOME/cmdline-tools/latest/bin/" | |
RUN sdkmanager "emulator" |