[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71829":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":31,"readmeContent":32,"aiSummary":33,"trendingCount":16,"starSnapshotCount":16,"syncStatus":34,"lastSyncTime":35,"discoverSource":36},71829,"docker-android","HQarroum\u002Fdocker-android","HQarroum","🤖 A minimal and customizable Docker image running the Android emulator as a service.","",null,"Shell",5832,443,29,13,0,30,91,245,90,113.94,"MIT License",false,"main",true,[27,28,29,30,5],"android","android-emulator","ci-pipeline","docker","2026-06-12 04:01:01","\u003Cbr \u002F>\u003Cbr \u002F>\u003Cbr \u002F>\n\u003Cp align=\"center\">\n  \u003Cimg width=\"400\" src=\"assets\u002Ficon.png\" \u002F>\n\u003C\u002Fp>\u003Cbr \u002F>\u003Cbr \u002F>\n\n# docker-android\n> A minimal and customizable Docker image running the Android emulator as a service.\n\n[![Docker Image CI](https:\u002F\u002Fgithub.com\u002FHQarroum\u002Fdocker-android\u002Factions\u002Fworkflows\u002Fdocker-image.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002FHQarroum\u002Fdocker-android\u002Factions\u002Fworkflows\u002Fdocker-image.yml)\n[![DeepSource](https:\u002F\u002Fdeepsource.io\u002Fgh\u002FHQarroum\u002Fdocker-android.svg\u002F?label=active+issues&show_trend=true&token=JTfGSHolIiMj0WNfv2ES0I6X)](https:\u002F\u002Fdeepsource.io\u002Fgh\u002FHQarroum\u002Fdocker-android\u002F?ref=repository-badge)\n![Docker Pulls](https:\u002F\u002Fimg.shields.io\u002Fdocker\u002Fpulls\u002Fhalimqarroum\u002Fdocker-android)\n\nCurrent version: **1.1.0**\n\n## 📋 Table of contents\n\n- [Features](#-features)\n- [Description](#-description)\n- [Usage](#-usage)\n- [See also](#-see-also)\n\n## 🔖 Features\n\n- Minimal Alpine based image bundled with the Android emulator and KVM support.\n- Bundles the Java Runtime Environment 11 in the image.\n- Customizable Android version, device type and image types.\n- Port-forwarding of emulator and ADB on the container network interface built-in.\n- Emulator images are wiped each time the emulator re-starts.\n- Runs headless, suitable for CI farms. Compatible with [`scrcpy`](https:\u002F\u002Fgithub.com\u002FGenymobile\u002Fscrcpy) to remotely control the Android screen.\n\n## 🔰 Description\n\nThe focus of this project is to provide a size-optimized Docker image bundled with the minimal amount of software required to expose a fully functionning Android emulator that's remotely controllable over the network. This image only contains the Android emulator itself, an ADB server used to remotely connect into the emulator from outside the container, and QEMU with `libvirt` support.\n\nYou can build this image without the Android SDK and without the Android emulator to make the image smaller. Below is a size comparison between some of the possible build variants.\n\nVariant                   |   Uncompressed   |  Compressed  |\n------------------------- | ---------------- | ------------ |\nAPI 33 + Emulator         |      5.84 GB     |    1.97 GB   |\nAPI 32 + Emulator         |      5.89 GB     |    1.93 GB   |\nAPI 28 + Emulator         |      4.29 GB     |    1.46 GB   |\nWithout SDK and emulator  |      414 MB      |    138 MB    |\n\n## 📘 Usage\n\nBy default, a build will bundle the Android SDK, platform tools and emulator with the image.\n\nwith docker-compose:\n\n```bash\ndocker compose up android-emulator\n```\n\nor with GPU acceleration\n```bash\ndocker compose up android-emulator-cuda\n```\n\nor for example with GPU acceleration and google playstore\n```bash\ndocker compose up android-emulator-cuda-store\n```\n\nwith only docker\n\n\n```bash\ndocker build -t android-emulator .\n```\n\n## Keys\n\nTo run google_apis_playstore image, you need to have same adbkey between emulator and client.\n\nYou can generate one by running `adb keygen adbkey`, that generates 2 files - adbkey and adbkey.pub.\n\noverride them inside .\u002Fkeys directory.\n\n### Running the container\n\nOnce the image is built, you can mount your KVM driver on the container and expose its ADB port.\n\n> Ensure 4GB of memory and at least 8GB of disk space for API 33.\n\n```bash\ndocker run -it --rm --device \u002Fdev\u002Fkvm -p 5555:5555 android-emulator\n```\n\n### Save data\u002Fstorage after restart (wipe)\n\nAll avd save in docker dir `\u002Fdata`, name for avd is `android`\n\n```bash\ndocker run -it --rm --device \u002Fdev\u002Fkvm -p 5555:5555 -v ~\u002Fandroid_avd:\u002Fdata android-emulator\n```\n\n### Connect ADB to the container\n\nThe ADB server in the container will be spawned automatically and listen on all interfaces in the container. After a few seconds, once the kernel has booted, you will be able to connect ADB to the container.\n\n```bash\nadb connect 127.0.0.1:5555\n```\n\nAdditionally, you can use [`scrcpy`](https:\u002F\u002Fgithub.com\u002FGenymobile\u002Fscrcpy) to control the screen of the emulator remotely. To do so, you simply have to connect ADB and run it locally.\n\n> By default, the emulator runs with a Pixel preset (1080x1920).\n\n```bash\nscrcpy\n```\n\n\u003Cbr \u002F>\n\u003Ctable>\n  \u003Ctr>\n    \u003Ctd>\n      \u003Cimg width=\"260\" src=\"assets\u002Fscreenshot.png\" \u002F>\n    \u003C\u002Ftd>\n    \u003Ctd>\n      \u003Cimg width=\"260\" src=\"assets\u002Fscreenshot-2.png\" \u002F>\n    \u003C\u002Ftd>\n    \u003Ctd>\n      \u003Cimg width=\"260\" src=\"assets\u002Fscreenshot-3.png\" \u002F>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\u003Cbr \u002F>\n\n### Customize the image\n\nIt is possible to customize the API level (Android version) and the image type (Google APIs vs PlayStore) when building the image.\n\n> By default, the image will build with API 33 with support for Google APIs for an x86_64 architecture.\n\nThis can come in handy when integrating multiple images as part of a CI pipeline where an application or a set of applications need to be tested against different Android versions. There are 2 variables that can be specified at build time to change the Android image.\n\n- `API_LEVEL` - Specifies the [API level](https:\u002F\u002Fapilevels.com\u002F) associated with the image. Use this parameter to change the Android version.\n- `IMG_TYPE` - Specifies the type of image to install.\n- `ARCHITECTURE` Specifies the CPU architecture of the Android image. Note that only `x86_64` and `x86` are actively supported by this image.\n\nThe below example will install Android Pie with support for the Google Play Store.\n\n```bash\ndocker build \\\n  --build-arg API_LEVEL=28 \\\n  --build-arg IMG_TYPE=google_apis_playstore \\\n  --build-arg ARCHITECTURE=x86 \\\n  --tag android-emulator .\n```\n\n### Variables\n#### Default variables\n\n#### Disable animation\nDISABLE_ANIMATION=false\n\n#### Disable hidden policy\nDISABLE_HIDDEN_POLICY=false\n\n#### Skip adb authentication\nSKIP_AUTH=true\n\n#### Memory for emulator\nMEMORY=8192\n\n#### Cores for emulator\nCORES=4\n\n#### Extra flags to emulator\nEXTRA_FLAGS=\"-no-metrics -no-audio -partition-size=8192\"\n\n### Mount an external drive in the container\n\nIt might be sometimes useful to have the entire Android SDK folder outside of the container (stored on a shared distributed filesystem such as NFS for example), to significantly reduce the size and the build time of the image.\n\nTo do so, you can specify a specific argument at build time to disable the download and installation of the SDK in the image.\n\n```bash\ndocker build -t android-emulator --build-arg INSTALL_ANDROID_SDK=0 .\n```\n\n> You will need mount the SDK in the container at `\u002Fopt\u002Fandroid`.\n\n```bash\ndocker run -it --rm --device \u002Fdev\u002Fkvm -p 5555:5555 -v \u002Fshared\u002Fandroid\u002Fsdk:\u002Fopt\u002Fandroid\u002F android-emulator\n```\n\n### Pull from Docker Hub\n\nDifferent pre-built images of `docker-android` exist on [Docker Hub](https:\u002F\u002Fhub.docker.com\u002Fr\u002Fhalimqarroum\u002Fdocker-android). Each image variant is tagged using its the api level and image type. For example, to pull an API 33 image, you can run the following.\n\n```bash\ndocker pull halimqarroum\u002Fdocker-android:api-33\n```\n\n## 👀 See also\n\n- The [alpine-android](https:\u002F\u002Fgithub.com\u002Falvr\u002Falpine-android) project which is based on a different Alpine image.\n- The [docker-android](https:\u002F\u002Fgithub.com\u002Fbudtmo\u002Fdocker-android) project which offers a WebRTC interface to an Android emulator.\n","该项目提供了一个最小化且可定制的Docker镜像，用于以服务形式运行Android模拟器。它基于Alpine系统构建，并集成了Java 11运行环境、KVM支持以及ADB服务器，允许用户自定义Android版本、设备类型等。该镜像还支持端口转发和无头模式运行，非常适合持续集成环境中的自动化测试或远程控制场景使用，同时兼容scrcpy工具实现远程屏幕操控。其轻量级的设计使得即使在资源受限的情况下也能高效运作。",2,"2026-06-11 03:38:51","high_star"]