2017-01-16 11:58:54 +00:00
|
|
|
FROM ubuntu:16.04
|
2016-12-22 13:29:57 +00:00
|
|
|
|
2017-01-08 16:24:14 +00:00
|
|
|
ENV DEBIAN_FRONTEND noninteractive
|
2017-02-11 21:46:41 +00:00
|
|
|
|
|
|
|
#=============
|
|
|
|
# Set WORKDIR
|
|
|
|
#=============
|
|
|
|
WORKDIR /root
|
|
|
|
|
2017-03-21 17:08:24 +00:00
|
|
|
#==================
|
|
|
|
# General Packages
|
|
|
|
#------------------
|
|
|
|
# git
|
|
|
|
# Clone git repository
|
|
|
|
# wget
|
|
|
|
# Network downloader
|
|
|
|
# unzip
|
|
|
|
# Unzip zip file
|
|
|
|
# curl
|
|
|
|
# Transfer data from or to a server
|
|
|
|
# supervisor
|
|
|
|
# Process manager
|
|
|
|
# openjdk-8-jdk
|
|
|
|
# Java
|
|
|
|
# libqt5webkit5
|
|
|
|
# Web content engine (Fix issue in Android)
|
|
|
|
#------------------
|
|
|
|
# NoVNC Packages
|
|
|
|
#------------------
|
|
|
|
# xvfb
|
|
|
|
# X virtual framebuffer
|
|
|
|
# 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
|
|
|
|
#------------------
|
|
|
|
# KVM Package
|
|
|
|
# for emulator x86
|
|
|
|
# https://help.ubuntu.com/community/KVM/Installation
|
|
|
|
#------------------
|
|
|
|
# qemu-kvm
|
|
|
|
# libvirt-bin
|
|
|
|
# ubuntu-vm-builder
|
|
|
|
# bridge-utils
|
|
|
|
#==================
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
unzip \
|
|
|
|
curl \
|
|
|
|
supervisor \
|
|
|
|
openjdk-8-jdk \
|
|
|
|
libqt5webkit5 \
|
|
|
|
xvfb \
|
|
|
|
x11vnc \
|
|
|
|
openbox \
|
|
|
|
menu \
|
|
|
|
python-numpy \
|
|
|
|
net-tools \
|
|
|
|
qemu-kvm \
|
|
|
|
libvirt-bin \
|
|
|
|
ubuntu-vm-builder \
|
|
|
|
bridge-utils \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2017-01-08 16:24:14 +00:00
|
|
|
#======================
|
|
|
|
# Clone noVNC projects
|
|
|
|
#======================
|
2017-03-21 17:08:24 +00:00
|
|
|
RUN git clone https://github.com/kanaka/noVNC.git \
|
|
|
|
&& cd noVNC/utils && git clone https://github.com/kanaka/websockify websockify
|
|
|
|
|
|
|
|
#======================================
|
|
|
|
# Install Android SDK and its packages
|
|
|
|
#======================================
|
|
|
|
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre
|
|
|
|
ENV PATH ${PATH}:${JAVA_HOME}/bin
|
|
|
|
|
|
|
|
ENV SDK_VERSION=25.2.3 \
|
|
|
|
BUILD_TOOL=25.0.2 \
|
|
|
|
ANDROID_HOME=/root
|
|
|
|
RUN wget -O android.zip https://dl.google.com/android/repository/tools_r${SDK_VERSION}-linux.zip \
|
|
|
|
&& unzip android.zip && rm android.zip
|
|
|
|
ENV PATH ${PATH}:${ANDROID_HOME}/tools
|
|
|
|
RUN echo y | android update sdk --no-ui --filter platform-tools,build-tools-${BUILD_TOOL}
|
|
|
|
ENV PATH ${PATH}:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/build-tools
|
2017-01-08 16:24:14 +00:00
|
|
|
RUN mv ${ANDROID_HOME}/tools/emulator ${ANDROID_HOME}/tools/emulator.backup
|
2016-12-22 13:29:57 +00:00
|
|
|
|
2017-01-08 16:24:14 +00:00
|
|
|
#====================================
|
|
|
|
# Install latest nodejs, npm, appium
|
|
|
|
#====================================
|
2017-03-21 17:08:24 +00:00
|
|
|
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - \
|
|
|
|
&& apt-get update && apt-get install -y nodejs && rm -rf /var/lib/apt/lists/*
|
2016-12-22 13:29:57 +00:00
|
|
|
ENV APPIUM_VERSION 1.6.3
|
2017-03-21 17:08:24 +00:00
|
|
|
RUN npm install -g appium@$APPIUM_VERSION && npm cache clean
|
2017-01-23 16:25:21 +00:00
|
|
|
|
2017-02-11 21:46:41 +00:00
|
|
|
#================================================
|
|
|
|
# noVNC Default Configurations
|
|
|
|
# These Configurations can be changed through -e
|
|
|
|
#================================================
|
2017-01-08 16:24:14 +00:00
|
|
|
ENV DISPLAY=:0 \
|
|
|
|
SCREEN=0 \
|
|
|
|
SCREEN_WIDTH=1600 \
|
|
|
|
SCREEN_HEIGHT=900 \
|
|
|
|
SCREEN_DEPTH=16 \
|
|
|
|
LOCAL_PORT=5900 \
|
|
|
|
TARGET_PORT=6080 \
|
2017-02-11 21:46:41 +00:00
|
|
|
TIMEOUT=1 \
|
|
|
|
LOG_PATH=/var/log/supervisor
|
2017-01-08 16:24:14 +00:00
|
|
|
RUN ln -s noVNC/vnc_auto.html noVNC/index.html
|
|
|
|
|
2017-03-21 17:08:24 +00:00
|
|
|
#===============
|
2017-01-23 16:25:21 +00:00
|
|
|
# Expose Ports
|
2017-03-21 17:08:24 +00:00
|
|
|
#---------------
|
|
|
|
# 4723
|
|
|
|
# appium port
|
|
|
|
# 6080
|
|
|
|
# noVNC port
|
|
|
|
#===============
|
|
|
|
EXPOSE 4723 6080
|
2017-01-23 16:25:21 +00:00
|
|
|
|
2017-02-11 21:46:41 +00:00
|
|
|
#==================
|
|
|
|
# Add Browser APKs
|
|
|
|
#==================
|
2017-02-27 13:53:48 +00:00
|
|
|
COPY browser_apk /root/browser_apk
|
|
|
|
|
2017-03-16 15:33:26 +00:00
|
|
|
#======================
|
|
|
|
# Add Emulator Devices
|
|
|
|
#======================
|
|
|
|
COPY devices /root/devices
|
2017-01-30 14:27:06 +00:00
|
|
|
|
2016-12-22 13:29:57 +00:00
|
|
|
#===================
|
|
|
|
# Run docker-appium
|
|
|
|
#===================
|
2017-02-11 21:46:41 +00:00
|
|
|
COPY supervisord.conf /root/
|
2017-02-27 13:53:48 +00:00
|
|
|
COPY src /root/src
|
2017-02-11 21:46:41 +00:00
|
|
|
CMD /usr/bin/supervisord --configuration supervisord.conf
|