Using docker-appium as base image
This commit is contained in:
parent
5b694c2c55
commit
65df456066
|
@ -1,6 +1,6 @@
|
|||
FROM ubuntu:16.04
|
||||
FROM appium/appium:1.6.6-beta-p0
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
LABEL maintainer "Budi Utomo <budi.ut.1989@gmail.com>"
|
||||
|
||||
#=============
|
||||
# Set WORKDIR
|
||||
|
@ -10,29 +10,15 @@ WORKDIR /root
|
|||
#==================
|
||||
# General Packages
|
||||
#------------------
|
||||
# wget
|
||||
# Network downloader
|
||||
# unzip
|
||||
# Unzip zip file
|
||||
# curl
|
||||
# Transfer data from or to a server
|
||||
# xterm
|
||||
# Terminal emulator
|
||||
# supervisor
|
||||
# Process manager
|
||||
# openjdk-8-jdk
|
||||
# Java
|
||||
# libqt5webkit5
|
||||
# Web content engine (Fix issue in Android)
|
||||
# socat
|
||||
# Port forwarder
|
||||
# libgconf-2-4
|
||||
# Required package for chrome and chromedriver to run on Linux
|
||||
#------------------
|
||||
# NoVNC Packages
|
||||
#------------------
|
||||
# xvfb
|
||||
# X virtual framebuffer
|
||||
# x11vnc
|
||||
# VNC server for X display
|
||||
# openbox
|
||||
|
@ -45,16 +31,9 @@ WORKDIR /root
|
|||
# Netstat
|
||||
#==================
|
||||
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
|
||||
wget \
|
||||
unzip \
|
||||
curl \
|
||||
xterm \
|
||||
supervisor \
|
||||
openjdk-8-jdk \
|
||||
libqt5webkit5 \
|
||||
socat \
|
||||
libgconf-2-4 \
|
||||
xvfb \
|
||||
x11vnc \
|
||||
openbox \
|
||||
menu \
|
||||
|
@ -79,52 +58,36 @@ RUN wget -nv -O noVNC.zip "https://github.com/kanaka/noVNC/archive/${NOVNC_SHA}
|
|||
&& rm websockify.zip \
|
||||
&& ln noVNC/vnc_auto.html noVNC/index.html
|
||||
|
||||
#=====================
|
||||
# Install Android SDK
|
||||
#=====================
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre
|
||||
ENV PATH ${PATH}:${JAVA_HOME}/bin
|
||||
|
||||
ENV SDK_VERSION=25.2.3 \
|
||||
ANDROID_HOME=/root
|
||||
RUN wget -nv -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 -a --filter platform-tools
|
||||
ENV PATH ${PATH}:${ANDROID_HOME}/platform-tools
|
||||
|
||||
#====================================
|
||||
# Install latest nodejs, npm, appium
|
||||
#====================================
|
||||
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - \
|
||||
&& apt-get -qqy update && apt-get -qqy install nodejs && rm -rf /var/lib/apt/lists/*
|
||||
ENV APPIUM_VERSION 1.6.3
|
||||
RUN npm install -g appium@$APPIUM_VERSION && npm cache clean
|
||||
|
||||
#======================
|
||||
# Install SDK packages
|
||||
#======================
|
||||
ARG ANDROID_VERSION=5.0.1
|
||||
ARG BUILD_TOOL=25.0.3
|
||||
ARG API_LEVEL=21
|
||||
ARG PROCESSOR=x86
|
||||
ARG SYS_IMG=x86_64
|
||||
ARG IMG_TYPE=google_apis
|
||||
ARG BROWSER=android
|
||||
ENV ANDROID_VERSION=$ANDROID_VERSION \
|
||||
BUILD_TOOL=$BUILD_TOOL \
|
||||
API_LEVEL=$API_LEVEL \
|
||||
PROCESSOR=$PROCESSOR \
|
||||
SYS_IMG=$SYS_IMG \
|
||||
IMG_TYPE=$IMG_TYPE \
|
||||
BROWSER=$BROWSER
|
||||
RUN echo y | android update sdk --no-ui -a --filter build-tools-${BUILD_TOOL}
|
||||
ENV PATH ${PATH}:${ANDROID_HOME}/build-tools
|
||||
|
||||
RUN rm ${ANDROID_HOME}/tools/emulator \
|
||||
&& ln -s ${ANDROID_HOME}/tools/emulator64-${PROCESSOR} ${ANDROID_HOME}/tools/emulator
|
||||
RUN echo y | android update sdk --no-ui -a -t android-${API_LEVEL},sys-img-${SYS_IMG}-${IMG_TYPE}-${API_LEVEL}
|
||||
|
||||
#==============================================
|
||||
# Download chrome driver v2.26
|
||||
# to be able to use chrome browser in emulator
|
||||
# Issue: https://github.com/butomo1989/docker-android/commit/6406504f944dae73d0a0c5d8e71a17a47dff9b33
|
||||
#==============================================
|
||||
RUN wget -nv -O chrome.zip "https://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip" \
|
||||
&& unzip -x chrome.zip \
|
||||
&& rm chrome.zip
|
||||
|
||||
#================================================
|
||||
# noVNC Default Configurations
|
||||
# These Configurations can be changed through -e
|
||||
|
@ -165,7 +128,7 @@ COPY src /root/src
|
|||
COPY supervisord.conf /root/
|
||||
RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf
|
||||
|
||||
HEALTHCHECK --interval=2s --timeout=600s --retries=1 \
|
||||
HEALTHCHECK --interval=2s --timeout=40s --retries=1 \
|
||||
CMD adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done'
|
||||
|
||||
CMD /usr/bin/supervisord --configuration supervisord.conf
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FROM ubuntu:16.04
|
||||
FROM appium/appium:1.6.6-beta-p0
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
LABEL maintainer "Budi Utomo <budi.ut.1989@gmail.com>"
|
||||
|
||||
#=============
|
||||
# Set WORKDIR
|
||||
|
@ -10,29 +10,15 @@ WORKDIR /root
|
|||
#==================
|
||||
# General Packages
|
||||
#------------------
|
||||
# wget
|
||||
# Network downloader
|
||||
# unzip
|
||||
# Unzip zip file
|
||||
# curl
|
||||
# Transfer data from or to a server
|
||||
# xterm
|
||||
# Terminal emulator
|
||||
# supervisor
|
||||
# Process manager
|
||||
# openjdk-8-jdk
|
||||
# Java
|
||||
# libqt5webkit5
|
||||
# Web content engine (Fix issue in Android)
|
||||
# socat
|
||||
# Port forwarder
|
||||
# libgconf-2-4
|
||||
# Required package for chrome and chromedriver to run on Linux
|
||||
#------------------
|
||||
# NoVNC Packages
|
||||
#------------------
|
||||
# xvfb
|
||||
# X virtual framebuffer
|
||||
# x11vnc
|
||||
# VNC server for X display
|
||||
# openbox
|
||||
|
@ -54,16 +40,9 @@ WORKDIR /root
|
|||
# bridge-utils
|
||||
#==================
|
||||
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
|
||||
wget \
|
||||
unzip \
|
||||
curl \
|
||||
xterm \
|
||||
supervisor \
|
||||
openjdk-8-jdk \
|
||||
libqt5webkit5 \
|
||||
socat \
|
||||
libgconf-2-4 \
|
||||
xvfb \
|
||||
x11vnc \
|
||||
openbox \
|
||||
menu \
|
||||
|
@ -92,52 +71,36 @@ RUN wget -nv -O noVNC.zip "https://github.com/kanaka/noVNC/archive/${NOVNC_SHA}
|
|||
&& rm websockify.zip \
|
||||
&& ln noVNC/vnc_auto.html noVNC/index.html
|
||||
|
||||
#=====================
|
||||
# Install Android SDK
|
||||
#=====================
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/jre
|
||||
ENV PATH ${PATH}:${JAVA_HOME}/bin
|
||||
|
||||
ENV SDK_VERSION=25.2.3 \
|
||||
ANDROID_HOME=/root
|
||||
RUN wget -nv -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 -a --filter platform-tools
|
||||
ENV PATH ${PATH}:${ANDROID_HOME}/platform-tools
|
||||
|
||||
#====================================
|
||||
# Install latest nodejs, npm, appium
|
||||
#====================================
|
||||
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - \
|
||||
&& apt-get -qqy update && apt-get -qqy install nodejs && rm -rf /var/lib/apt/lists/*
|
||||
ENV APPIUM_VERSION 1.6.3
|
||||
RUN npm install -g appium@$APPIUM_VERSION && npm cache clean
|
||||
|
||||
#======================
|
||||
# Install SDK packages
|
||||
#======================
|
||||
ARG ANDROID_VERSION=5.0.1
|
||||
ARG BUILD_TOOL=25.0.3
|
||||
ARG API_LEVEL=21
|
||||
ARG PROCESSOR=x86
|
||||
ARG SYS_IMG=x86_64
|
||||
ARG IMG_TYPE=google_apis
|
||||
ARG BROWSER=android
|
||||
ENV ANDROID_VERSION=$ANDROID_VERSION \
|
||||
BUILD_TOOL=$BUILD_TOOL \
|
||||
API_LEVEL=$API_LEVEL \
|
||||
PROCESSOR=$PROCESSOR \
|
||||
SYS_IMG=$SYS_IMG \
|
||||
IMG_TYPE=$IMG_TYPE \
|
||||
BROWSER=$BROWSER
|
||||
RUN echo y | android update sdk --no-ui -a --filter build-tools-${BUILD_TOOL}
|
||||
ENV PATH ${PATH}:${ANDROID_HOME}/build-tools
|
||||
|
||||
RUN rm ${ANDROID_HOME}/tools/emulator \
|
||||
&& ln -s ${ANDROID_HOME}/tools/emulator64-${PROCESSOR} ${ANDROID_HOME}/tools/emulator
|
||||
RUN echo y | android update sdk --no-ui -a -t android-${API_LEVEL},sys-img-${SYS_IMG}-${IMG_TYPE}-${API_LEVEL}
|
||||
|
||||
#==============================================
|
||||
# Download chrome driver v2.26
|
||||
# to be able to use chrome browser in emulator
|
||||
# Issue: https://github.com/butomo1989/docker-android/commit/6406504f944dae73d0a0c5d8e71a17a47dff9b33
|
||||
#==============================================
|
||||
RUN wget -nv -O chrome.zip "https://chromedriver.storage.googleapis.com/2.26/chromedriver_linux64.zip" \
|
||||
&& unzip -x chrome.zip \
|
||||
&& rm chrome.zip
|
||||
|
||||
#================================================
|
||||
# noVNC Default Configurations
|
||||
# These Configurations can be changed through -e
|
||||
|
|
Loading…
Reference in a new issue