explaingit

hqarroum/docker-android

5,607ShellAudience · developerComplexity · 4/5Setup · hard

TLDR

Docker-Android packages an Android emulator inside a Docker container so you can run and test Android apps on a server without physical devices or a graphical display.

Mindmap

mindmap
  root((docker-android))
    What It Does
      Android emulator in Docker
      Remote device access
      No physical phone needed
    Tech Stack
      Shell
      Docker
      Alpine Linux
      KVM
    Use Cases
      CI/CD testing
      Multi-version testing
      Screen mirroring
    Requirements
      Linux with KVM
      4GB RAM minimum
    Audience
      Developers
      DevOps teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run automated Android app tests in CI/CD pipelines across multiple Android API levels without needing physical devices.

USE CASE 2

Spin up a consistent, scriptable Android test environment on a Linux server for reproducible results.

USE CASE 3

Test an app against different Android versions by building separate containers with different API level arguments.

USE CASE 4

Mirror and interact with the running emulator display remotely using scrcpy from your own machine.

Tech stack

ShellDockerAlpine LinuxAndroidKVM

Getting it running

Difficulty · hard Time to first run · 1h+

Requires a Linux host with KVM hardware virtualization enabled, does not work on most cloud VMs without nested virtualization support.

In plain English

Docker-Android is a project that packages an Android phone emulator inside a Docker container so it can run on a server without a physical device or a graphical display. The emulator starts up as a background service, and you can connect to it remotely using standard Android developer tools. This is useful for automated testing pipelines where you want to run Android apps against different Android versions without needing a rack of physical phones or a developer workstation. The image is built on Alpine Linux to keep its size down, though it still requires several gigabytes because the Android emulator itself is large. You can choose which version of Android to install by setting a build argument at image-build time, letting you create multiple variants for testing across API levels. You can also choose whether to include the Google Play Store, which some apps require to function. Because the emulator requires hardware virtualization, the container needs access to the host machine's KVM device, a Linux kernel feature for running virtual machines. This means it works on Linux servers that have KVM enabled but does not run on most cloud virtual machines without nested virtualization support. The README notes that you need at least 4 GB of memory and 8 GB of disk space for modern Android versions. Once the container is running, you connect to it using ADB, the standard Android debug bridge tool, over a network port. You can also use a separate screen-mirroring tool called scrcpy to see and interact with the emulator's display from your own machine. This project is aimed at developers and CI/CD teams who want a consistent, scriptable Android test environment that does not depend on physical hardware.

Copy-paste prompts

Prompt 1
I want to run Docker-Android in my GitHub Actions CI to test my Android app. Show me a workflow YAML that starts the container and runs ADB instrumentation tests.
Prompt 2
How do I start a Docker-Android container for Android 12 with Google Play included and connect to it via ADB on my local Linux machine?
Prompt 3
My Docker-Android container won't start and says KVM is not available. How do I check if KVM is enabled on my Linux server and fix it?
Prompt 4
How do I use scrcpy to mirror the screen of a running Docker-Android container so I can visually inspect the emulator from my laptop?
Open on GitHub → Explain another repo

← hqarroum on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.