mirror of
https://github.com/budtmo/docker-android.git
synced 2026-07-31 04:07:25 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee9c3e3635 | ||
|
|
d8ac737d00 | ||
|
|
d6a582ae20 | ||
|
|
120d80f0ab | ||
|
|
377cb04ca1 | ||
|
|
a1f83daf10 | ||
|
|
c27ab1d6d6 | ||
|
|
ca0f85b48f | ||
|
|
b1114d9b87 |
@@ -19,6 +19,7 @@ env:
|
||||
- ANDROID_VERSION=8.0
|
||||
- ANDROID_VERSION=8.1
|
||||
- ANDROID_VERSION=9.0
|
||||
- ANDROID_VERSION=10.0
|
||||
- REAL_DEVICE=True
|
||||
- GENYMOTION=True
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ List of Docker images
|
||||
|Linux|8.0|26|chrome|58.0|2.31|budtmo/docker-android-x86-8.0|[](https://microbadger.com/images/budtmo/docker-android-x86-8.0 "Get your own image badge on microbadger.com")|
|
||||
|Linux|8.1|27|chrome|61.0|2.33|budtmo/docker-android-x86-8.1|[](https://microbadger.com/images/budtmo/docker-android-x86-8.1 "Get your own image badge on microbadger.com")|
|
||||
|Linux|9.0|28|chrome|66.0|2.40|budtmo/docker-android-x86-9.0|[](https://microbadger.com/images/budtmo/docker-android-x86-9.0 "Get your own image badge on microbadger.com")|
|
||||
|Linux|10.0|29|chrome|74.0|74.0.3729.6|budtmo/docker-android-x86-10.0|[](https://microbadger.com/images/budtmo/docker-android-x86-10.0 "Get your own image badge on microbadger.com")|
|
||||
|All |-|-|-|-|-|budtmo/docker-android-real-device|[](https://microbadger.com/images/budtmo/docker-android-real-device "Get your own image badge on microbadger.com")|
|
||||
|All|All|All|All|All|All|budtmo/docker-android-genymotion|[](https://microbadger.com/images/budtmo/docker-android-genymotion "Get your own image badge on microbadger.com")|
|
||||
|
||||
|
||||
@@ -24,4 +24,18 @@ You can easily scale your Appium tests on Genymotion Android virtual devices in
|
||||
docker run -it --rm -p 4723:4723 -v $PWD/genymotion/example/sample_devices:/root/tmp -v ~/.aws:/root/.aws -e TYPE=aws budtmo/docker-android-genymotion
|
||||
```
|
||||
|
||||
Existing security group and subnet can be used:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"region": "us-west-2",
|
||||
"instance": "t2.small",
|
||||
"AMI": "ami-0673cbd39ef84d97c",
|
||||
"SG": "sg-000aaa",
|
||||
"subnet_id": "subnet-000aaa"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
You can also use [this docker-compose file](genymotion/example/geny.yml).
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM appium/appium:1.14.0-p0
|
||||
FROM appium/appium:1.14.2-p0
|
||||
|
||||
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM appium/appium:1.14.0-p0
|
||||
FROM appium/appium:1.14.2-p0
|
||||
|
||||
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
|
||||
|
||||
|
||||
+30
-2
@@ -1,4 +1,4 @@
|
||||
FROM appium/appium:1.14.0-p0
|
||||
FROM appium/appium:1.14.2-p0
|
||||
|
||||
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
|
||||
|
||||
@@ -69,9 +69,38 @@ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
|
||||
net-tools \
|
||||
ffmpeg \
|
||||
jq \
|
||||
curl \
|
||||
libavcodec-dev \
|
||||
libavformat-dev \
|
||||
libavutil-dev \
|
||||
gcc \
|
||||
git \
|
||||
make \
|
||||
meson \
|
||||
musl-dev \
|
||||
pkgconf \
|
||||
libsdl2-dev \
|
||||
&& apt clean all \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
#===========
|
||||
# scrcpy - screen copy
|
||||
# https://github.com/Genymobile/scrcpy
|
||||
#===========
|
||||
ARG SCRCPY_VER=1.10
|
||||
ARG SERVER_HASH="cbeb1a4e046f1392c1dc73c3ccffd7f86dec4636b505556ea20929687a119390"
|
||||
|
||||
RUN mkdir /root/scrcpy
|
||||
RUN curl -L -o /root/scrcpy/scrcpy-code.zip https://github.com/Genymobile/scrcpy/archive/v${SCRCPY_VER}.zip
|
||||
RUN curl -L -o /root/scrcpy/scrcpy-server.jar https://github.com/Genymobile/scrcpy/releases/download/v${SCRCPY_VER}/scrcpy-server-v${SCRCPY_VER}.jar
|
||||
RUN echo "$SERVER_HASH scrcpy/scrcpy-server.jar" | sha256sum -c -
|
||||
RUN cd scrcpy && unzip -x scrcpy-code.zip
|
||||
RUN cd scrcpy/scrcpy-${SCRCPY_VER} && meson x --buildtype release --strip -Db_lto=true -Dprebuilt_server=/root/scrcpy/scrcpy-server.jar
|
||||
RUN cd scrcpy/scrcpy-${SCRCPY_VER}/x && ninja && ninja install
|
||||
RUN rm -rf scrcpy/
|
||||
|
||||
|
||||
#===========
|
||||
# Polyverse
|
||||
# https://polyverse.io/how-it-works/
|
||||
@@ -156,7 +185,6 @@ EXPOSE 4723 6080 5555
|
||||
#===================
|
||||
# Run docker-appium
|
||||
#===================
|
||||
COPY sm/asm.jar /root/
|
||||
COPY src /root/src
|
||||
COPY supervisord.conf /root/
|
||||
RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf
|
||||
|
||||
+3
-1
@@ -10,7 +10,7 @@ else
|
||||
fi
|
||||
|
||||
if [ -z "$2" ]; then
|
||||
read -p "Android version (5.0.1|5.1.1|6.0|7.0|7.1.1|8.0|8.1|9.0|all): " ANDROID_VERSION
|
||||
read -p "Android version (5.0.1|5.1.1|6.0|7.0|7.1.1|8.0|8.1|9.0|10.0|all): " ANDROID_VERSION
|
||||
else
|
||||
ANDROID_VERSION=$2
|
||||
fi
|
||||
@@ -30,6 +30,7 @@ declare -A list_of_levels=(
|
||||
[8.0]=26
|
||||
[8.1]=27
|
||||
[9.0]=28
|
||||
[10.0]=29
|
||||
)
|
||||
|
||||
# The version of the Chrome browser installed on the Android emulator needs to be known beforehand
|
||||
@@ -43,6 +44,7 @@ declare -A chromedriver_versions=(
|
||||
[8.0]="2.31"
|
||||
[8.1]="2.33"
|
||||
[9.0]="2.40"
|
||||
[10.0]="74.0.3729.6"
|
||||
)
|
||||
|
||||
function get_android_versions() {
|
||||
|
||||
BIN
Binary file not shown.
+14
-2
@@ -59,12 +59,17 @@ function prepare_geny_aws() {
|
||||
instance=$(get_value '.instance')
|
||||
ami=$(get_value '.AMI')
|
||||
sg=$(get_value '.SG')
|
||||
subnet_id=$(get_value '.subnet_id')
|
||||
if [[ $subnet_id == null ]]; then
|
||||
subnet_id=""
|
||||
fi
|
||||
|
||||
echo $region
|
||||
echo $android_version
|
||||
echo $instance
|
||||
echo $ami
|
||||
echo $sg
|
||||
echo $subnet_id
|
||||
|
||||
#TODO: remove this dirty hack
|
||||
if [[ $android_version == null ]]; then
|
||||
@@ -183,6 +188,11 @@ variable "instance_type_$index" {
|
||||
default = "$instance"
|
||||
}
|
||||
|
||||
variable "subnet_id_$index" {
|
||||
type = "string"
|
||||
default = "$subnet_id"
|
||||
}
|
||||
|
||||
provider "aws" {
|
||||
alias = "provider_$index"
|
||||
region = "\${var.aws_region_$index}"
|
||||
@@ -214,6 +224,7 @@ resource "aws_instance" "geny_aws_$index" {
|
||||
provider = "aws.provider_$index"
|
||||
ami="\${data.aws_ami.geny_aws_$index.id}"
|
||||
instance_type = "\${var.instance_type_$index}"
|
||||
subnet_id = "\${var.subnet_id_$index}"
|
||||
vpc_security_group_ids=["\${aws_security_group.geny_sg_$index.name}"]
|
||||
key_name = "\${aws_key_pair.geny_key_$index.key_name}"
|
||||
tags {
|
||||
@@ -292,8 +303,9 @@ function run_appium() {
|
||||
CMD+=" --relaxed-security"
|
||||
fi
|
||||
|
||||
echo "Preparation is done"
|
||||
$CMD
|
||||
echo "Preparation is done"
|
||||
TERM="xterm -T AppiumServer -n AppiumServer -e $CMD"
|
||||
$TERM
|
||||
}
|
||||
|
||||
function ga(){
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
if [ -z "$REAL_DEVICE"]; then
|
||||
echo "Container is using android emulator"
|
||||
else
|
||||
echo "Starting android screen mirror..."
|
||||
java -jar /root/asm.jar $ANDROID_HOME
|
||||
echo "Starting android screen copy..."
|
||||
/usr/local/bin/scrcpy
|
||||
fi
|
||||
+4
-5
@@ -35,12 +35,11 @@ autorestart=false
|
||||
priority=1
|
||||
|
||||
;startsecs to fix "not expected" error. see: https://github.com/Supervisor/supervisor/issues/212#issuecomment-47933372
|
||||
[program:android-screen-mirror]
|
||||
command=./src/asm.sh
|
||||
[program:screen-copy]
|
||||
command=./src/scrcpy.sh
|
||||
autorestart=false
|
||||
startsecs=0
|
||||
stdout_logfile=%(ENV_LOG_PATH)s/android-screen-mirror.stdout.log
|
||||
stderr_logfile=%(ENV_LOG_PATH)s/android-screen-mirror.stderr.log
|
||||
stdout_logfile=%(ENV_LOG_PATH)s/screen-copy.stdout.log
|
||||
stderr_logfile=%(ENV_LOG_PATH)s/screen-copy.stderr.log
|
||||
priority=3
|
||||
|
||||
[program:atd]
|
||||
|
||||
Reference in New Issue
Block a user