Compare commits

..
20 Commits
Author SHA1 Message Date
butomo1989 9adec7fcfd Fixed missing path 2019-07-10 16:10:05 +02:00
butomo1989 4de36e6568 Added Docker-Android logo as Background for other images and cleaned up 2019-07-10 16:07:20 +02:00
Budi UtomoandGitHub c299582ac4 Merge pull request #173 from trinhpham/master
Added Docker-Android logo as Background
2019-07-10 15:59:57 +02:00
Trinh Pham 69654cd036 Set screen background on startup 2019-07-10 18:30:59 +07:00
Trinh Pham 81f110adea Set screen background on startup 2019-07-10 18:30:46 +07:00
Trinh Pham 068bb87ab3 Merge branch 'master' of https://github.com/budtmo/docker-android
# Conflicts:
#	docker/Emulator_x86
#	docker/configs/sources1810.list
#	docker/configs/x11vnc.pref
#	docker/sources1810.list
#	docker/x11vnc.pref
#	src/sources1810.list
#	src/x11vnc.pref
2019-07-10 18:28:53 +07:00
Trinh Pham d1559b6748 Set screen background on startup 2019-07-10 18:20:46 +07:00
Trinh Pham 5c3cc8ed4d Add screen background 2019-07-10 16:14:27 +07:00
Trinh Pham 2ba73f87e0 Organize config files 2019-07-10 15:59:18 +07:00
butomo1989 d789139be9 Added ATD 2019-07-10 10:13:26 +02:00
butomo1989 b162e2ee58 Fixed typo 2019-07-10 09:35:34 +02:00
butomo1989 42b4775e9f Updated the base image 2019-07-10 09:35:17 +02:00
Trinh Pham 4213882f04 Add screen background 2019-07-10 14:30:48 +07:00
butomo1989 1b6bdab388 Used the same implementation of Docker-Image from Emulator_x86 2019-07-09 14:13:52 +02:00
Budi UtomoandGitHub 087c91922c Merge pull request #171 from trinhpham/master
Activate only one view of Desktop
2019-07-09 13:54:42 +02:00
Trinh Pham 168f51471c Single virtual desktop 2019-07-09 18:10:58 +07:00
butomo1989 19e26a086b Enabled proxy on Android emulator 2019-07-05 09:37:19 +02:00
butomo1989 de073327af Addded different templates for issues 2019-07-03 10:54:05 +02:00
Budi UtomoandGitHub e7d684eb0a Updated readme.md 2019-07-03 10:36:08 +02:00
butomo1989 6237f452f8 Added hyperlink 2019-07-02 13:57:10 +02:00
18 changed files with 187 additions and 28 deletions
+9 -3
View File
@@ -1,10 +1,16 @@
**Please make sure that it is an issue / a feature request. If it is a question / help wanted, please visit [our group chat](https://gitter.im/budtmo/docker-android). Thank you!**
---
name: 🐛 Bug report
about: Report a bug to improve the tool
---
## 🐛 Bug Report
Operating System:
<!-- OSX Yosemite, Ubuntu 16.04, Windows 10 etc -->
<!-- OSX Yosemite, Ubuntu 18.04, Windows 10 etc -->
Docker Image:
<!-- butomo1989/docker-android-x86-7.1.1, butomo1989/docker-android-real-device etc -->
<!-- budtmo/docker-android-x86-7.1.1, budtmo/docker-android-real-device etc -->
Docker Version:
<!-- 17.09.0-ce, 17.06.2-ce etc -->
+16
View File
@@ -0,0 +1,16 @@
---
name: 🚀 Feature Request
about: Submit your idea to have cool features
---
## 🚀 Feature Request
Idea:
<!-- A clear explanation about the feature -->
Problems that want to be solved:
<!-- A clear explanation about why we need that feature -->
Note:
<!-- Additional note -->
+9
View File
@@ -0,0 +1,9 @@
---
name: 💬 Questions / Help
about: If you have questions, please check the group chat
---
## 💬 Questions and Help
**Please make sure that it is an issue / a feature request. If it is a question / help wanted, please visit [our group chat](https://gitter.im/budtmo/docker-android). Thank you!**
Regular → Executable
View File
+1 -1
View File
@@ -52,7 +52,7 @@ List of Docker images
|Linux|8.1|27|chrome|61.0|2.33|budtmo/docker-android-x86-8.1|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-x86-8.1.svg)](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://images.microbadger.com/badges/image/budtmo/docker-android-x86-9.0.svg)](https://microbadger.com/images/budtmo/docker-android-x86-9.0 "Get your own image badge on microbadger.com")|
|All |-|-|-|-|-|budtmo/docker-android-real-device|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-real-device.svg)](https://microbadger.com/images/budtmo/docker-android-real-device "Get your own image badge on microbadger.com")|
|Linux|All|All|All|All|All|budtmo/docker-android-genymotion|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-genymotion.svg)](https://microbadger.com/images/budtmo/docker-android-genymotion "Get your own image badge on microbadger.com")|
|All|All|All|All|All|All|budtmo/docker-android-genymotion|[![](https://images.microbadger.com/badges/image/budtmo/docker-android-genymotion.svg)](https://microbadger.com/images/budtmo/docker-android-genymotion "Get your own image badge on microbadger.com")|
List of Devices
---------------
+9 -3
View File
@@ -1,11 +1,12 @@
Proxy
-----
You can enable proxy inside container by passing following environment variables:
You can enable proxy inside container and Android emulator by passing following environment variables:
- HTTP_PROXY="\<docker\_bridge\_ip\_address>"
- HTTPS_PROXY="\<docker\_bridge\_ip\_address>"
- HTTP_PROXY="http://\<docker\_bridge\_ip>:<port>"
- HTTPS_PROXY=""http://\<docker\_bridge\_ip>:<port>"
- NO_PROXY="localhost"
- ENABLE_PROXY_ON_EMULATOR=true
Language
--------
@@ -31,6 +32,11 @@ If you want to add more arguments for running emulator, you can ***pass an envir
docker run --privileged -d -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" -e EMULATOR_ARGS="-no-snapshot-load -partition-size 512" --name android-container budtmo/docker-android-x86-8.1
```
Appium Test Distribution (ATD)
------------------------------
You can enable [ATD](https://github.com/AppiumTestDistribution/AppiumTestDistribution) by passing environment variable ATD=true and bind the port to the host, e.g. -p 4567:4567
SaltStack
---------
+1 -1
View File
@@ -3,7 +3,7 @@ Genymotion Cloud
![Genymotion](images/logo_genymotion.png)
You can easily scale your Appium tests on Genymotion Android virtual devices in the cloud. They are available on SaaS or as virtual images on AWS, GCP or Alibaba Cloud.
You can easily scale your Appium tests on Genymotion Android virtual devices in the cloud. They are available on [SaaS](http://bit.ly/2YP0P1l) or as virtual images on AWS, GCP or Alibaba Cloud.
1. On SaaS <br />
Use [device.json](genymotion/example/sample_devices/devices.json) to define the device to start. You can specify the port on which the device will start so you don't need to change the device name in your tests every time you need to run those tests. Then run following command
+17 -3
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.13.0-p0
FROM appium/appium:1.14.0-p0
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
@@ -36,6 +36,8 @@ RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
# We use package from ubuntu 18.10 to fix crashing issue
# openbox
# Windows manager
# feh
# ScreenBackground
# menu
# Debian menu
# python-numpy
@@ -59,14 +61,15 @@ RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
# ubuntu-vm-builder
# bridge-utils
#==================
ADD docker/sources1810.list /etc/apt/sources.list.d/
ADD docker/x11vnc.pref /etc/apt/preferences.d/
ADD docker/configs/sources1810.list /etc/apt/sources.list.d/
ADD docker/configs/x11vnc.pref /etc/apt/preferences.d/
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
xterm \
supervisor \
socat \
x11vnc \
openbox \
feh \
menu \
python-numpy \
net-tools \
@@ -158,6 +161,17 @@ ENV DISPLAY=:0 \
VIDEO_PATH=/tmp/video \
LOG_PATH=/var/log/supervisor
#================================================
# openbox configuration
# Update the openbox configuration files to:
# + Use a single virtual desktop to prevent accidentally switching
# + Add background
#================================================
ADD images/logo_dockerandroid_small.png /root/logo.png
ADD src/.fehbg /root/.fehbg
RUN sed -i "s/<number>4<\/number>/<number>1<\/number>/g" /etc/xdg/openbox/rc.xml \
&& echo /root/.fehbg >> /etc/xdg/openbox/autostart
#===============
# Expose Ports
#---------------
+34 -13
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.13.0-p0
FROM appium/appium:1.14.0-p0
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
@@ -7,6 +7,18 @@ LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
#=============
WORKDIR /root
#===========
# Polyverse
# https://polyverse.io/how-it-works/
#===========
ARG TOKEN=xxx
RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
if [ $? -eq 0 ]; then \
apt -y update && \
apt-get -y install --reinstall $(dpkg --get-selections | awk '{print $1}'); \
fi
#==================
# General Packages
#------------------
@@ -32,8 +44,13 @@ WORKDIR /root
#------------------
# x11vnc
# VNC server for X display
# We use package from ubuntu 18.10 to fix crashing issue
# openbox
# Windows manager
# feh
# ScreenBackground
# python-xdg
# Required by openbox autostart function
# menu
# Debian menu
# python-numpy
@@ -48,6 +65,8 @@ WORKDIR /root
# jq
# Sed for JSON data
#==================
ADD docker/configs/sources1810.list /etc/apt/sources.list.d/
ADD docker/configs/x11vnc.pref /etc/apt/preferences.d/
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
xterm \
supervisor \
@@ -58,25 +77,16 @@ RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
python3-pip \
x11vnc \
openbox \
feh \
python-xdg \
menu \
python-numpy \
net-tools \
ffmpeg \
jq \
&& apt clean all \
&& rm -rf /var/lib/apt/lists/*
#===========
# Polyverse
# https://polyverse.io/how-it-works/
#===========
ARG TOKEN=xxx
RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
if [ $? -eq 0 ]; then \
apt -y update && \
apt-get -y install --reinstall $(dpkg --get-selections | awk '{print $1}'); \
fi
#=======
# noVNC
# Use same commit id that docker-selenium uses
@@ -116,6 +126,17 @@ ENV DISPLAY=:0 \
APP_RELEASE_VERSION=$APP_RELEASE_VERSION \
APP_TYPE=Genymotion
#================================================
# openbox configuration
# Update the openbox configuration files to:
# + Use a single virtual desktop to prevent accidentally switching
# + Add background
#================================================
ADD images/logo_dockerandroid_small.png /root/logo.png
ADD src/.fehbg /root/.fehbg
RUN sed -i "s/<number>4<\/number>/<number>1<\/number>/g" /etc/xdg/openbox/rc.xml \
&& echo /root/.fehbg >> /etc/xdg/openbox/autostart
#============
# Set Locale
#============
+34 -1
View File
@@ -1,4 +1,4 @@
FROM appium/appium:1.13.0-p0
FROM appium/appium:1.14.0-p0
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
@@ -7,6 +7,18 @@ LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
#=============
WORKDIR /root
#===========
# Polyverse
# https://polyverse.io/how-it-works/
#===========
ARG TOKEN=xxx
RUN curl -s https://sh.polyverse.io | sh -s install ${TOKEN}; \
if [ $? -eq 0 ]; then \
apt -y update && \
apt-get -y install --reinstall $(dpkg --get-selections | awk '{print $1}'); \
fi
#==================
# General Packages
#------------------
@@ -21,8 +33,13 @@ WORKDIR /root
#------------------
# x11vnc
# VNC server for X display
# We use package from ubuntu 18.10 to fix crashing issue
# openbox
# Windows manager
# feh
# ScreenBackground
# python-xdg
# Required by openbox autostart function
# menu
# Debian menu
# python-numpy
@@ -37,17 +54,22 @@ WORKDIR /root
# jq
# Sed for JSON data
#==================
ADD docker/configs/sources1810.list /etc/apt/sources.list.d/
ADD docker/configs/x11vnc.pref /etc/apt/preferences.d/
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
xterm \
supervisor \
socat \
x11vnc \
openbox \
feh \
python-xdg \
menu \
python-numpy \
net-tools \
ffmpeg \
jq \
&& apt clean all \
&& rm -rf /var/lib/apt/lists/*
#===========
@@ -101,6 +123,17 @@ ENV DISPLAY=:0 \
APP_RELEASE_VERSION=$APP_RELEASE_VERSION \
APP_TYPE=Device
#================================================
# openbox configuration
# Update the openbox configuration files to:
# + Use a single virtual desktop to prevent accidentally switching
# + Add background
#================================================
ADD images/logo_dockerandroid_small.png /root/logo.png
ADD src/.fehbg /root/.fehbg
RUN sed -i "s/<number>4<\/number>/<number>1<\/number>/g" /etc/xdg/openbox/rc.xml \
&& echo /root/.fehbg >> /etc/xdg/openbox/autostart
#=========================
# Set default variables
#=========================
Executable
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
feh --bg-max '/root/logo.png'
+2 -2
View File
@@ -204,9 +204,9 @@ def run():
cfg.write('\ndisk.dataPartition.size={dp}'.format(dp=dp_size))
if is_first_run:
cmd = 'emulator/emulator @{name} -gpu swiftshader_indirect -accel on -wipe-data -verbose {custom_args}'.format(name=avd_name, custom_args=custom_args)
cmd = 'emulator/emulator @{name} -gpu swiftshader_indirect -accel on -wipe-data -writable-system -verbose {custom_args}'.format(name=avd_name, custom_args=custom_args)
else:
cmd = 'emulator/emulator @{name} -gpu swiftshader_indirect -accel on -verbose {custom_args}'.format(name=avd_name, custom_args=custom_args)
cmd = 'emulator/emulator @{name} -gpu swiftshader_indirect -accel on -verbose -writable-system {custom_args}'.format(name=avd_name, custom_args=custom_args)
appium = convert_str_to_bool(str(os.getenv('APPIUM', False)))
if appium:
subprocess.Popen(cmd.split())
+1 -1
View File
@@ -3,6 +3,6 @@
if [ -z "$REAL_DEVICE"]; then
echo "Container is using android emulator"
else
echo "Starting android screen mirro..."
echo "Starting android screen mirror..."
java -jar /root/asm.jar $ANDROID_HOME
fi
Executable
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
if [ "$ATD" = true ]; then
echo "Starting ATD..."
java -jar /root/RemoteAppiumManager.jar -DPort=4567
fi
+39
View File
@@ -38,6 +38,45 @@ function disable_animation () {
adb shell "settings put global animator_duration_scale 0.0"
}
function enable_proxy_if_needed () {
if [ "$ENABLE_PROXY_ON_EMULATOR" = true ]; then
if [ ! -z "${HTTP_PROXY// }" ]; then
if [[ $HTTP_PROXY == *"http"* ]]; then
protocol="$(echo $HTTP_PROXY | grep :// | sed -e's,^\(.*://\).*,\1,g')"
proxy="$(echo ${HTTP_PROXY/$protocol/})"
echo "[EMULATOR] - Proxy: $proxy"
IFS=':' read -r -a p <<< "$proxy"
echo "[EMULATOR] - Proxy-IP: ${p[0]}"
echo "[EMULATOR] - Proxy-Port: ${p[1]}"
wait_emulator_to_be_ready
echo "Enable proxy on Android emulator. Please make sure that docker-container has internet access!"
adb root
echo "Mount system to read write access"
adb shell "mount -o rw,remount /system"
echo "Updateing Proxy"
adb shell "content update --uri content://telephony/carriers --bind proxy:s:"${p[0]}" --bind port:s:"${p[1]}" --where "mcc=310" --where "mnc=260""
echo "remount system back to read only"
adb shell "mount -o ro,remount /system"
adb unroot
else
echo "Please use http:// in the beginning!"
fi
else
echo "$HTTP_PROXY is not given! Please pass it through environment variable!"
exit 1
fi
fi
}
enable_proxy_if_needed
sleep 1
change_language_if_needed
sleep 1
install_google_play
+7
View File
@@ -43,6 +43,13 @@ stdout_logfile=%(ENV_LOG_PATH)s/android-screen-mirror.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/android-screen-mirror.stderr.log
priority=3
[program:atd]
command=./src/atd.sh
autorestart=false
stdout_logfile=%(ENV_LOG_PATH)s/atd.stdout.log
stderr_logfile=%(ENV_LOG_PATH)s/atd.stderr.log
priority=4
[program:docker-appium]
command=./src/appium.sh
autorestart=false