2019-05-06 12:26:16 +01:00
|
|
|
FROM appium/appium:1.13.0-p0
|
2018-05-29 01:04:30 +01:00
|
|
|
|
2019-02-21 17:01:38 +00:00
|
|
|
LABEL maintainer "Budi Utomo <budtmo.os@gmail.com>"
|
2018-05-29 01:04:30 +01:00
|
|
|
|
|
|
|
#=============
|
|
|
|
# Set WORKDIR
|
|
|
|
#=============
|
|
|
|
WORKDIR /root
|
|
|
|
|
|
|
|
#==================
|
|
|
|
# General Packages
|
|
|
|
#------------------
|
|
|
|
# xterm
|
|
|
|
# Terminal emulator
|
|
|
|
# supervisor
|
|
|
|
# Process manager
|
|
|
|
# socat
|
|
|
|
# Port forwarder
|
2018-08-24 15:14:04 +01:00
|
|
|
# keychain
|
|
|
|
# ssh-key creator
|
2018-05-29 01:04:30 +01:00
|
|
|
#------------------
|
2018-06-25 21:54:01 +01:00
|
|
|
# Genymotion spec
|
|
|
|
#------------------
|
|
|
|
# bzip2
|
|
|
|
# File compression
|
|
|
|
#------------------
|
2018-05-29 01:04:30 +01:00
|
|
|
# NoVNC Packages
|
|
|
|
#------------------
|
|
|
|
# x11vnc
|
|
|
|
# VNC server for X display
|
|
|
|
# openbox
|
|
|
|
# Windows manager
|
|
|
|
# menu
|
|
|
|
# Debian menu
|
|
|
|
# python-numpy
|
|
|
|
# Numpy, For faster performance: https://github.com/novnc/websockify/issues/77
|
|
|
|
# net-tools
|
|
|
|
# Netstat
|
|
|
|
#------------------
|
|
|
|
# Video Recording
|
|
|
|
#------------------
|
|
|
|
# ffmpeg
|
|
|
|
# Video recorder
|
|
|
|
# jq
|
|
|
|
# Sed for JSON data
|
|
|
|
#==================
|
|
|
|
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
|
|
|
|
xterm \
|
|
|
|
supervisor \
|
|
|
|
socat \
|
2018-08-24 15:14:04 +01:00
|
|
|
keychain \
|
2018-06-25 21:54:01 +01:00
|
|
|
bzip2 \
|
2018-05-29 01:04:30 +01:00
|
|
|
x11vnc \
|
|
|
|
openbox \
|
|
|
|
menu \
|
|
|
|
python-numpy \
|
|
|
|
net-tools \
|
|
|
|
ffmpeg \
|
|
|
|
jq \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
#=======
|
|
|
|
# noVNC
|
|
|
|
# Use same commit id that docker-selenium uses
|
|
|
|
# https://github.com/elgalu/docker-selenium/blob/236b861177bd2917d864e52291114b1f5e4540d7/Dockerfile#L412-L413
|
|
|
|
#=======
|
|
|
|
ENV NOVNC_SHA="b403cb92fb8de82d04f305b4f14fa978003890d7" \
|
|
|
|
WEBSOCKIFY_SHA="558a6439f14b0d85a31145541745e25c255d576b"
|
|
|
|
RUN wget -nv -O noVNC.zip "https://github.com/kanaka/noVNC/archive/${NOVNC_SHA}.zip" \
|
|
|
|
&& unzip -x noVNC.zip \
|
|
|
|
&& rm noVNC.zip \
|
|
|
|
&& mv noVNC-${NOVNC_SHA} noVNC \
|
|
|
|
&& wget -nv -O websockify.zip "https://github.com/kanaka/websockify/archive/${WEBSOCKIFY_SHA}.zip" \
|
|
|
|
&& unzip -x websockify.zip \
|
|
|
|
&& mv websockify-${WEBSOCKIFY_SHA} ./noVNC/utils/websockify \
|
|
|
|
&& rm websockify.zip \
|
|
|
|
&& ln noVNC/vnc_auto.html noVNC/index.html
|
|
|
|
|
|
|
|
#================================================
|
|
|
|
# noVNC Default Configurations
|
|
|
|
# These Configurations can be changed through -e
|
|
|
|
#================================================
|
2018-10-26 14:00:46 +01:00
|
|
|
ARG APP_RELEASE_VERSION=1.5-p0
|
2018-05-29 01:04:30 +01:00
|
|
|
ENV DISPLAY=:0 \
|
|
|
|
SCREEN=0 \
|
|
|
|
SCREEN_WIDTH=1600 \
|
|
|
|
SCREEN_HEIGHT=900 \
|
|
|
|
SCREEN_DEPTH=16 \
|
|
|
|
LOCAL_PORT=5900 \
|
|
|
|
TARGET_PORT=6080 \
|
|
|
|
TIMEOUT=1 \
|
|
|
|
VIDEO_PATH=/tmp/video \
|
2018-10-26 14:00:46 +01:00
|
|
|
LOG_PATH=/var/log/supervisor \
|
|
|
|
GA=true \
|
|
|
|
GA_ENDPOINT=https://www.google-analytics.com/collect \
|
2019-01-30 13:58:31 +00:00
|
|
|
GA_TRACKING_ID=UA-133466903-1 \
|
2018-10-26 14:00:46 +01:00
|
|
|
GA_API_VERSION="1" \
|
|
|
|
APP_RELEASE_VERSION=$APP_RELEASE_VERSION \
|
|
|
|
APP_TYPE=Genymotion
|
2018-05-29 01:04:30 +01:00
|
|
|
|
|
|
|
#====================
|
|
|
|
# Install genymotion
|
|
|
|
#====================
|
2018-09-04 09:34:49 +01:00
|
|
|
RUN echo | ssh-keygen -q
|
2019-03-01 10:14:38 +00:00
|
|
|
ARG GENYMOTION_VERSION=3.0.1
|
2018-06-25 21:54:01 +01:00
|
|
|
ENV GENYMOTION=true \
|
|
|
|
GENYMOTION_VERSION=$GENYMOTION_VERSION \
|
|
|
|
PATH="${PATH}:/opt/genymobile/genymotion/" \
|
|
|
|
APPIUM_LOG=$LOG_PATH/appium.log
|
|
|
|
RUN wget -nv -O genymotion.bin "https://dl.genymotion.com/releases/genymotion-${GENYMOTION_VERSION}/genymotion-${GENYMOTION_VERSION}-linux_x64.bin" \
|
|
|
|
&& chmod +x ./genymotion.bin \
|
|
|
|
&& yes | ./genymotion.bin \
|
|
|
|
&& rm genymotion.bin
|
2018-08-29 12:02:44 +01:00
|
|
|
COPY genymotion/generate_config.sh genymotion/geny_start.sh genymotion/enable_adb.sh /root/
|
2018-05-29 01:04:30 +01:00
|
|
|
|
2018-08-11 18:38:47 +01:00
|
|
|
#===================
|
|
|
|
# Install Terraform
|
|
|
|
#===================
|
|
|
|
ARG TERRAFORM_VERSION=0.11.7
|
|
|
|
|
|
|
|
ENV TERRAFORM_VERSION=$TERRAFORM_VERSION
|
|
|
|
RUN wget -nv -O terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" \
|
|
|
|
&& unzip -x terraform.zip \
|
|
|
|
&& rm terraform.zip
|
|
|
|
|
2018-05-29 01:04:30 +01:00
|
|
|
#===============
|
|
|
|
# Expose Ports
|
|
|
|
#---------------
|
|
|
|
# 4723
|
|
|
|
# Appium port
|
|
|
|
# 6080
|
|
|
|
# noVNC port
|
|
|
|
# 5555
|
|
|
|
# ADB connection port
|
|
|
|
#===============
|
|
|
|
EXPOSE 4723 6080 5555
|
|
|
|
|
|
|
|
#=======================
|
|
|
|
# Run docker-genymotion
|
|
|
|
#=======================
|
|
|
|
COPY src /root/src
|
|
|
|
COPY supervisord.conf /root/
|
2018-06-25 21:54:01 +01:00
|
|
|
RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf /root/geny_start.sh
|
2018-06-26 21:53:34 +01:00
|
|
|
RUN gmtool --cloud config use_custom_sdk=on sdk_path=/root
|
2018-05-29 23:54:06 +01:00
|
|
|
CMD ["./geny_start.sh"]
|