网站首页 > 开源技术 正文
项目的官方是这么介绍这个项目的:
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).
Docker-Android 是一个构建来开发测试于安卓相关应用的Docker 镜像
来看看这个项目运行起来的效果
运行这个项目之前,需要先检查您服务器对于kvm的支持,运行下面的命令,如果得到KVM acceleration can be used的输出结果,则您的服务器支持kvm,可以部署这个项目。如果输出不是这个结果,请在bios中开启虚拟化的支持。如果是虚拟机也请开启对应的虚拟化。
demouser@demohosts:~$ sudo apt install -y cpu-checker
[sudo] demouser 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成
将会同时安装下列软件:
msr-tools
下列【新】软件包将被安装:
cpu-checker msr-tools
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 3 个软件包未被升级。
需要下载 15.8 kB 的归档。
解压缩后会消耗 65.5 kB 的额外空间。
获取:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 msr-tools amd64 1.3-5build1 [9,610 B]
获取:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu noble/main amd64 cpu-checker amd64 0.7-1.3build2 [6,148 B]
已下载 15.8 kB,耗时 0秒 (54.9 kB/s)
正在选中未选择的软件包 msr-tools。
(正在读取数据库 ... 系统当前共安装有 156724 个文件和目录。)
准备解压 .../msr-tools_1.3-5build1_amd64.deb ...
正在解压 msr-tools (1.3-5build1) ...
正在选中未选择的软件包 cpu-checker。
准备解压 .../cpu-checker_0.7-1.3build2_amd64.deb ...
正在解压 cpu-checker (0.7-1.3build2) ...
正在设置 msr-tools (1.3-5build1) ...
正在设置 cpu-checker (0.7-1.3build2) ...
正在处理用于 man-db (2.12.0-4build2) 的触发器 ...
demouser@demohosts:~$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
下面的两个表为项目官方提供的支持的系统版本和设备的信息表。我们要运行的基于这个项目的一些容器,就需要从这两个表中的内容进行选择。
项目官方提供的镜像列表
Android | API | Image with latest release version | Image with specific release version |
9.0 | 28 | budtmo/docker-android:emulator_9.0 | budtmo/docker-android:emulator_9.0_<release_version> |
10.0 | 29 | budtmo/docker-android:emulator_10.0 | budtmo/docker-android:emulator_10.0_<release_version> |
11.0 | 30 | budtmo/docker-android:emulator_11.0 | budtmo/docker-android:emulator_11.0_<release_version> |
12.0 | 32 | budtmo/docker-android:emulator_12.0 | budtmo/docker-android:emulator_12.0_<release_version> |
13.0 | 33 | budtmo/docker-android:emulator_13.0 | budtmo/docker-android:emulator_13.0_<release_version> |
14.0 | 34 | budtmo/docker-android:emulator_14.0 | budtmo/docker-android:emulator_14.0_<release_version> |
- | - | budtmo/docker-android:genymotion | budtmo/docker-android:genymotion_<release_version> |
可用的设备列表
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 |
项目官方的运行例子采用的模拟设备为Samsung Galaxy S10,然后使用了android11(budtmo/docker-android:emulator_11.0)的系统。命令和运行结果如下,镜像比较大有8G左右,拉取镜像的时间比较长,请耐心等待:
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_14.0
Unable to find image 'budtmo/docker-android:emulator_14.0' locally
emulator_14.0: Pulling from docker-android
560c024910be: Pull complete
64b77aed7b78: Pull complete
3fd5b31e0aa9: Pull complete
670e34ea6ccb: Pull complete
4f4fb700ef54: Pull complete
bc62e21c56f2: Pull complete
c1c6959469d1: Pull complete
42ef5ecdb1fb: Pull complete
080a8e25227e: Pull complete
2a7c79dd2c14: Pull complete
e4fcde3bea74: Pull complete
5e757c9070af: Pull complete
5aee064462b8: Pull complete
bd01987dc087: Pull complete
52c6e53d1d42: Pull complete
a61455b01e22: Pull complete
1ad9373cd855: Pull complete
71df122140ae: Pull complete
da1b3d0aa212: Pull complete
512b22658f4e: Pull complete
87ba17eefda3: Pull complete
a7a8fb0e7ec6: Pull complete
213056b019a9: Pull complete
834d8049b8a8: Pull complete
ee1ed3039be2: Pull complete
9c8f333fd573: Pull complete
Digest: sha256:8ee737a9b06af29c8aedf7e28cb4e636444f3ad26d74d0ebdaf2b9912e9642ea
Status: Downloaded newer image for budtmo/docker-android:emulator_14.0
64f26dba38e180467d09057ed4a27f358c99a1718402113d99acd4f469c33f93
查看其启动情况
demouser@demohosts:~$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
64f26dba38e1 192.168.10.70:5000/docker-android:emulator_14.0 "/home/androidusr/do…" 2 minutes ago Up 2 minutes 4723/tcp, 5554-5555/tcp, 5900/tcp, 9000/tcp, 0.0.0.0:6080->6080/tcp, :::6080->6080/tcp android-container
在浏览器中输入服务器IP加上6080
点击【 连接 】的按键,稍等一下,系统开机后,就可以进入到安卓系统中。右边有模拟的控制按键可以控制。也可以使用鼠标做触控的测试。
系统为原生的安卓系统。用起来肯定是没有那些换皮肤和优化过的系统用起来那么随手,但是那它来做应用的测试还是没有问题的。
猜你喜欢
- 2024-10-10 Android案例分享,基于瑞芯微RK3568国产平台
- 2024-10-10 Win+Ubuntu缝合怪:第三方开发者推出“Wubuntu”Linux发行版
- 2024-10-10 手把手教你在Ubuntu定制文件系统【飞凌OKT507-C开发板教程】
- 2024-10-10 洪水预警利器:ARMxy工控机在水文监测中的应用实践
- 2024-10-10 新一代的ARM开发板,可运行Android 4.4、Ubuntu等操作系统
- 2024-10-10 如何在安卓手机上运行linux系统和应用
- 2024-10-10 在Linux下安装AndroidStudio(linux安装安卓app)
- 2024-10-10 Docker容器搭建android编译环境(安卓搭建docker)
- 2024-10-10 Google 真不要 Android 了吗?Android studio 3.2这个错误太奇葩
- 2024-10-10 首款Ubuntu手机本周开卖(ubuntu手机系统官网版)
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- jdk (81)
- putty (66)
- rufus (78)
- 内网穿透 (89)
- okhttp (70)
- powertoys (74)
- windowsterminal (81)
- netcat (65)
- ghostscript (65)
- veracrypt (65)
- asp.netcore (70)
- wrk (67)
- aspose.words (80)
- itk (80)
- ajaxfileupload.js (66)
- sqlhelper (67)
- express.js (67)
- phpmailer (67)
- xjar (70)
- redisclient (78)
- wakeonlan (66)
- tinygo (85)
- startbbs (72)
- webftp (82)
- vsvim (79)
本文暂时没有评论,来添加一个吧(●'◡'●)