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.
Your machine need to support virtualization. To check it:
sudo apt install cpu-checker
kvm-ok
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
部署容器 1.1 手动部署 1.1.1 配置docker # 安装之前必须修改docker路径,防止docker空间增长暴满。 sudo ln -s /opt/docker /var/lib/docker # 安装docker.io sudo apt-get install docker.io # 设置docker命令免root sudo usermod -aG docker ${whoami}
docker-compose部署mysql docker-compose 文章目录 docker-compose部署mysql 前言 一、docker-compose简介 二、部署步骤 1. 在/root 目录下新建目录docker-compose,在/root/docker-compose目录下新建mysql文件件 2 准备挂载文件 3.编写docker-compose.yml文件 4. 启动
1、如何使用 docker-compose 部署 selenium grid 产品文档 - SeleniumHQ / docker-selenium https://github.com/SeleniumHQ/docker-selenium 产品文档 - Selenium Grid 4 https://www.selenium.dev/documentation/grid/ 产品文档 - sele
一、解决的问题 二、与虚拟机的比较 三、优势 四、使用场景 五、镜像与容器 参考资料 一、解决的问题 由于不同的机器有不同的操作系统,以及不同的库和组件,在将一个应用部署到多台机器上需要进行大量的环境配置操作。 Docker 主要解决环境配置问题,它是一种虚拟化技术,对进程进行隔离,被隔离的进程独立于宿主操作系统和其它隔离的进程。使用 Docker 可以不修改应用程序代码,不需要开发人员学习特定环
我检查了垃圾箱,里面没有ping
第一章 Docker介绍1 1.1 docker简介 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的\[Linux\]机器上,也可以实现\[虚拟化\]。容器是完全使用\[沙箱\]机制,相互之间不会有任何接口。 1.2 Docker是什么? Docker是一个程序运行、测试、交付的开放平台,Docker被设计为能够使你快速地交
推荐使用 Swoole 官方 Docker:https://github.com/swoole/docker-swoole
Docker Commands Commands Notes docker ps -a Show all containers on the system docker ps Show only currently running containers docker run <NAME> Creates & runs a docker container via an image docker i
环境准备 1. 下载镜像及配置文件 链接: https://pan.baidu.com/s/1hw0h1KUlhSirFBId6kh8mw 提取码: 1wng $ ls backend-0.0.8.tar.gz env.list grpc-go-greeting-0.1.tar.gz nginx-lb.conf nginx-perf.conf nginxplus-23-r1.tar.