Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Android in docker solution with noVNC supported and video recording

License

NotificationsYou must be signed in to change notification settings

budtmo/docker-android

 
 

Repository files navigation

Paypal DonatePRs WelcomecodecovJoin the chat at https://gitter.im/budtmo/docker-androidGitHub release

Docker-Android is a docker image built to be used for everything related to Android. It can be used for Application development and testing (native, web and hybrid-app).

Advantages of using this project

  1. Emulator with different device profile and skins, such as Samsung Galaxy S6, LG Nexus 4, HTC Nexus One and more.
  2. Support vnc to be able to see what happen inside docker container
  3. Support log sharing feature where all logs can be accessed from web-UI
  4. Ability to control emulator from outside container by using adb connect
  5. Integrated with other cloud solutions, e.g.Genymotion Cloud
  6. It can be used to build Android project
  7. It can be used to run unit and UI-Test with different test-frameworks, e.g. Appium, Espresso, etc.

List of Docker-Images

AndroidAPIImage with latest release versionImage with specific release version
9.028budtmo/docker-android:emulator_9.0budtmo/docker-android:emulator_9.0_<release_version>
10.029budtmo/docker-android:emulator_10.0budtmo/docker-android:emulator_10.0_<release_version>
11.030budtmo/docker-android:emulator_11.0budtmo/docker-android:emulator_11.0_<release_version>
12.032budtmo/docker-android:emulator_12.0budtmo/docker-android:emulator_12.0_<release_version>
13.033budtmo/docker-android:emulator_13.0budtmo/docker-android:emulator_13.0_<release_version>
14.034budtmo/docker-android:emulator_14.0budtmo/docker-android:emulator_14.0_<release_version>
--budtmo/docker-android:genymotionbudtmo/docker-android:genymotion_<release_version>

List of Devices

TypeDevice Name
PhoneSamsung Galaxy S10
PhoneSamsung Galaxy S9
PhoneSamsung Galaxy S8
PhoneSamsung Galaxy S7 Edge
PhoneSamsung Galaxy S7
PhoneSamsung Galaxy S6
PhoneNexus 4
PhoneNexus 5
PhoneNexus One
PhoneNexus S
TabletNexus 7
TabletPixel C

Requirements

  1. Docker is installed on your system.

Quick Start

  1. If you useUbuntu OS on your host machine, you can skip this step. ForOSX andWindows OS user, you need to use Virtual Machine that support Virtualization with Ubuntu OS because the image can be run underUbuntu OS only.

  2. Your machine should support virtualization. To check if the virtualization is enabled is:

    sudo apt install cpu-checkerkvm-ok
  3. Run Docker-Android container

    docker run -d -p 6080:6080 -e EMULATOR_DEVICE="Samsung Galaxy S10" -e WEB_VNC=true --device /dev/kvm --name android-container budtmo/docker-android:emulator_11.0
  4. Openhttp://localhost:6080 to see inside running container.

  5. To check the status of the emulator

    docker exec -it android-container cat device_status

Persisting data

The default behaviour is to destroy the emulated device on container restart. To persist data, you need to mount a volume at/home/androidusr:docker run -v data:/home/androidusr budtmo/docker-android:emulator_11.0

WSL2 Hardware acceleration (Windows 11 only)

Credit goes toGuillaume - The Parallel Interface blog

Microsoft - Advanced settings configuration in WSL

  1. Add yourself to thekvm usergroup.

    sudo usermod -a -G kvm ${USER}
  2. Add necessary flags to/etc/wsl.conf to their respective sections.

    [boot]command = /bin/bash -c 'chown -v root:kvm /dev/kvm && chmod 660 /dev/kvm'[wsl2]nestedVirtualization=true
  3. Restart WSL2 via CMD prompt or Powershell

    wsl --shutdown

command = /bin/bash -c 'chown -v root:kvm /dev/kvm && chmod 660 /dev/kvm' sets/dev/kvm tokvm usergroup rather than the defaultroot usergroup on WSL2 startup.

nestedVirtualization flag is only available to Windows 11.

Use-Cases

  1. Build Android project
  2. UI-Test with Appium
  3. Control Android emulator on host machine
  4. SMS Simulation
  5. Jenkins
  6. Deploying on cloud (Azure, AWS, GCP)

Custom-Configurations

Thisdocument contains information about configurations that can be used to enable some features, e.g. log-sharing, etc.

Genymotion

For you who do not have ressources to maintain the simulator or to buy machines or need different device profiles, you can give a try by usingGenymotion SAAS. Docker-Android isintegrated with Genymotion on different cloud services, e.g. Genymotion SAAS, AWS, GCP, Alibaba Cloud. Please followthis document for more detail.

Emulator Skins

The Emulator skins are taken fromAndroid Studio IDE andSamsung Developer Website

USERS

docker-android-users

PRO VERSION

Due to high requests for help and to be able to actively maintain the projects, the creator has decided to create docker-android-pro. Docker-Android-Pro is a sponsor based project which mean that the docker image of pro-version can be pulled only byactive sponsor.

The differences between normal version and pro version are:

FeatureNormalProComment
user-behavior-analyticsYesNo-
proxyNoYesSet up company proxy on Android emulator on fly
languageNoYesSet up language on Android emulator on fly
Newer Android versionNoYesSupport other newer Android version e.g. Android 15, Android 16, etc
root-privilegedNoYesAble to run command with security privileged
headless-modeNoYesSave resources by using headless mode
Selenium 4.x integrationNoYesRunning Appium UI-Tests againt one (Selenium Hub) endpoint for Android- and iOS emulator(s) / device(s)
multiple Android-SimulatorsNoYes (soon)Save resources by having multiple Android-Simulators on one docker-container
Google Play StoreNoYes (soon)-
Video RecordingNoYes (soon)Helpful for debugging

Thisdocument contains detail information about how to use docker-android-pro.

LICENSE

SeeLicense


[8]ページ先頭

©2009-2025 Movatter.jp