Complete Android-Studio in a Docker container. You can even start an Emulator inside it.
10K+
Complete Android-Studio in a Docker container. You can even start an Emulator inside it.
If you don't have a display the Emulator can run with a "dummy" display - perfect for continous integration.
Tested on Linux only.
Just run "./build.sh", or "docker build -t deadolus/android-studio ." directly. An already built version is also on Docker Hub. So you may also run "docker pull deadolus/android-studio". You may of course change the name of the container.
Run
"HOST_DISPLAY=1 ./run.sh"
or run directly via
"docker run -i $AOSP_ARGS -v pwd/studio-data:/studio-data --privileged --group-add plugdev deadolus/android-studio"
run.sh has some options which you can set via Environment variables.
You may use a Variable like this: "HOST_NET=1 ./run.sh"
The default docker entrypoint tries to start android-studio. So it probably does not make sense to try starting via run.sh without HOST_DISPLAY=1. If you just want a shell in the container, without starting Android Studio, run "./run.sh bash" to bypass starting Android Studio
docker compose build android_emulatordocker compose run android_emulatorI included a script under provisioning/ndkTests.sh which demonstrates how you may use this container in a CI environment. The script starts a headless container, if the HOSTNAME variable is set to CI. It then changes in to a directory (workspace/GoogleTestApp) where it builds and installs an app. It parses logcat for lines containing a string (GoogleTest), uninstalls the app and does some analysis on the parsed lines. While this script probably does not make much sense FOR YOU, it might be useful as a guiding point for you.
@Deadolus
@guilhermelinhares
@mtomcanyi
@Naveenkhegde
@BenBlumer
Content type
Image
Digest
sha256:6472b0180…
Size
4 GB
Last updated
almost 3 years ago
docker pull deadolus/android-studio