Docker-Android is a docker image built to be used for everything related to mobile website testing and Android project.
Emulator - Samsung Device | Emulator - Nexus Device | Real Device |
---|---|---|
![]() |
![]() |
![]() |
Type | Device Name |
---|---|
Phone | Samsung Galaxy S10 |
Phone | Samsung Galaxy S9 |
Phone | Samsung Galaxy S8 |
Phone | Samsung Galaxy S7 Edge |
Phone | Samsung Galaxy S7 |
Phone | Samsung Galaxy S6 |
Phone | Nexus 4 |
Phone | Nexus 5 |
Phone | Nexus One |
Phone | Nexus S |
Tablet | Nexus 7 |
Docker is installed in your system.
Run Docker-Android
For Linux OS, please use image name that contains "x86"
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container budtmo/docker-android-x86-8.1
For OSX and Windows OS, please use Virtual Machine that support Virtualization with Ubuntu OS
Verify the ip address of docker host.
For OSX, you can find out by using following command:
docker-machine ip default
For different OS, localhost should work.
Open http://docker-host-ip-address:6080 from web browser. Note: Adding ?view_only=true
will give user only view only permission.
This document contains custom configurations of Docker-Android that you might need, e.g. Proxy, Changing language on fly, etc.
Docker-Android can be used for building Android project and executing its unit test. This following steps will illustrate how to build Android project:
Clone this sample test project.
git clone git@github.com:android/testing-samples.git
Build the project
docker run -it --rm -v $PWD/testing-samples/ui/espresso/BasicSample:/tmp -w /tmp budtmo/docker-android-x86-8.1 /tmp/gradlew build
Create a docker container with this command
$ docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -p 4723:4723 --name android-container-appium budtmo/docker-android-real-device
Open noVNC http://localhost:6080
Open terminal by clicking right on noVNC window >> Terminal emulator
To connect to host's adb (make sure your host have adb and connected to the device.)
$ adb -H host.docker.internal devices
To specify port, just add -P port_number
$ adb -H host.docker.internal -P 5037 devices
Now your container can access your host devices. But, you need to add remoteAdbHost
and adbPort
desired capabilities to make Appium can recognise those devices.
If you want to use Appium and Selenium Grid, you can follow this document. It also contains sample and use cases.
adb connect <docker-machine-ip-address>:5555
Note: You need to have Android Debug Bridge (adb) installed in your host machine.
Using telnet
docker exec -it android-container cat /root/.emulator_console_auth_token
telnet <docker-machine-ip-address> 5554
auth <auth_token>
sms send <phone_number> <message>
Using adb
docker exec -it android-container adb emu sms send <phone_number> <message>
You can also integrate it inside project using adb library.
Not installed at this time.
This document gives you information about custom plugin that supports Docker-Android.
This document shows you how to configure Virtual Machine on VMWARE to be able to run Docker-Android.
This document contains information about deploying Docker-Android on cloud services.
For you who do not have ressources to maintain the simulator or to buy machines or need different device profiles, you need to give a try to Genymotion Cloud. Docker-Android is integrated with Genymotion on different cloud services, e.g. Genymotion Cloud, AWS, GCP, Alibaba Cloud. Please follow this document or this blog for more detail.
All logs inside container are stored under folder /var/log/supervisor. you can print out log file by using docker exec. Example:
docker exec -it android-container tail -f /var/log/supervisor/docker-android.stdout.log
The Emulator skins are taken from Android Studio IDE and Samsung Developer Website
All docker images are protected by Polyverse by scrambling the Linux packages. For more information please visit this link
You can use cadvisor combined with influxdb / prometheus and grafana if needed to monitor each running container.
Docker-Android are being used by 100+ countries around the world.
See License
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。