Removed arm image
This commit is contained in:
parent
7d29525b48
commit
e22b8f141e
10
README.md
10
README.md
|
@ -48,11 +48,6 @@ List of Docker images
|
||||||
|Linux|6.0|23|butomo1989/docker-android-x86-6.0|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-x86-6.0.svg)](https://microbadger.com/images/butomo1989/docker-android-x86-6.0 "Get your own image badge on microbadger.com")|
|
|Linux|6.0|23|butomo1989/docker-android-x86-6.0|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-x86-6.0.svg)](https://microbadger.com/images/butomo1989/docker-android-x86-6.0 "Get your own image badge on microbadger.com")|
|
||||||
|Linux|7.0|24|butomo1989/docker-android-x86-7.0|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-x86-7.0.svg)](https://microbadger.com/images/butomo1989/docker-android-x86-7.0 "Get your own image badge on microbadger.com")|
|
|Linux|7.0|24|butomo1989/docker-android-x86-7.0|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-x86-7.0.svg)](https://microbadger.com/images/butomo1989/docker-android-x86-7.0 "Get your own image badge on microbadger.com")|
|
||||||
|Linux|7.1.1|25|butomo1989/docker-android-x86-7.1.1|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-x86-7.1.1.svg)](https://microbadger.com/images/butomo1989/docker-android-x86-7.1.1 "Get your own image badge on microbadger.com")|
|
|Linux|7.1.1|25|butomo1989/docker-android-x86-7.1.1|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-x86-7.1.1.svg)](https://microbadger.com/images/butomo1989/docker-android-x86-7.1.1 "Get your own image badge on microbadger.com")|
|
||||||
|OSX / Windows|5.0.1|21|butomo1989/docker-android-arm-5.0.1|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-arm-5.0.1.svg)](https://microbadger.com/images/butomo1989/docker-android-arm-5.0.1 "Get your own image badge on microbadger.com")|
|
|
||||||
|OSX / Windows|5.1.1|22|butomo1989/docker-android-arm-5.1.1|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-arm-5.1.1.svg)](https://microbadger.com/images/butomo1989/docker-android-arm-5.1.1 "Get your own image badge on microbadger.com")|
|
|
||||||
|OSX / Windows|6.0|23|butomo1989/docker-android-arm-6.0|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-arm-6.0.svg)](https://microbadger.com/images/butomo1989/docker-android-arm-6.0 "Get your own image badge on microbadger.com")|
|
|
||||||
|OSX / Windows|7.0|24|butomo1989/docker-android-arm-7.0|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-arm-7.0.svg)](https://microbadger.com/images/butomo1989/docker-android-arm-7.0 "Get your own image badge on microbadger.com")|
|
|
||||||
|OSX / Windows|7.1.1|25|butomo1989/docker-android-arm-7.1.1|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-arm-7.1.1.svg)](https://microbadger.com/images/butomo1989/docker-android-arm-7.1.1 "Get your own image badge on microbadger.com")|
|
|
||||||
|All |-|-|butomo1989/docker-android-real-device|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-real-device.svg)](https://microbadger.com/images/butomo1989/docker-android-real-device "Get your own image badge on microbadger.com")|
|
|All |-|-|butomo1989/docker-android-real-device|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-real-device.svg)](https://microbadger.com/images/butomo1989/docker-android-real-device "Get your own image badge on microbadger.com")|
|
||||||
|Linux|All|All|butomo1989/docker-android-genymotion|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-genymotion.svg)](https://microbadger.com/images/butomo1989/docker-android-genymotion "Get your own image badge on microbadger.com")|
|
|Linux|All|All|butomo1989/docker-android-genymotion|[![](https://images.microbadger.com/badges/image/butomo1989/docker-android-genymotion.svg)](https://microbadger.com/images/butomo1989/docker-android-genymotion "Get your own image badge on microbadger.com")|
|
||||||
|
|
||||||
|
@ -84,11 +79,8 @@ Quick Start
|
||||||
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container butomo1989/docker-android-x86-7.1.1
|
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container butomo1989/docker-android-x86-7.1.1
|
||||||
```
|
```
|
||||||
|
|
||||||
- For ***OSX*** and ***Windows OS***, please use image name that contains "arm"
|
- For ***OSX*** and ***Windows OS***, please use Virtual Machine that support Virtualization
|
||||||
|
|
||||||
```bash
|
|
||||||
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" --name android-container butomo1989/docker-android-arm-7.1.1
|
|
||||||
```
|
|
||||||
|
|
||||||
2. Verify the ip address of docker host.
|
2. Verify the ip address of docker host.
|
||||||
|
|
||||||
|
|
|
@ -1,145 +0,0 @@
|
||||||
FROM appium/appium:1.8.1-p2
|
|
||||||
|
|
||||||
LABEL maintainer "Budi Utomo <budi.ut.1989@gmail.com>"
|
|
||||||
|
|
||||||
#=============
|
|
||||||
# Set WORKDIR
|
|
||||||
#=============
|
|
||||||
WORKDIR /root
|
|
||||||
|
|
||||||
#==================
|
|
||||||
# General Packages
|
|
||||||
#------------------
|
|
||||||
# xterm
|
|
||||||
# Terminal emulator
|
|
||||||
# supervisor
|
|
||||||
# Process manager
|
|
||||||
# socat
|
|
||||||
# Port forwarder
|
|
||||||
#------------------
|
|
||||||
# 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 \
|
|
||||||
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
|
|
||||||
|
|
||||||
#======================
|
|
||||||
# Install SDK packages
|
|
||||||
#======================
|
|
||||||
ARG ANDROID_VERSION=5.0.1
|
|
||||||
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 \
|
|
||||||
API_LEVEL=$API_LEVEL \
|
|
||||||
PROCESSOR=$PROCESSOR \
|
|
||||||
SYS_IMG=$SYS_IMG \
|
|
||||||
IMG_TYPE=$IMG_TYPE \
|
|
||||||
BROWSER=$BROWSER
|
|
||||||
ENV PATH ${PATH}:${ANDROID_HOME}/build-tools
|
|
||||||
RUN yes | sdkmanager --licenses && \
|
|
||||||
sdkmanager "platforms;android-${API_LEVEL}" "system-images;android-${API_LEVEL};${IMG_TYPE};${SYS_IMG}" "emulator"
|
|
||||||
RUN rm ${ANDROID_HOME}/tools/emulator \
|
|
||||||
&& ln -s ${ANDROID_HOME}/emulator/emulator64-${PROCESSOR} ${ANDROID_HOME}/tools/emulator
|
|
||||||
ENV LD_LIBRARY_PATH=$ANDROID_HOME/emulator/lib64:$ANDROID_HOME/emulator/lib64/qt/lib
|
|
||||||
|
|
||||||
#==============================================
|
|
||||||
# Download latest version of chromedriver
|
|
||||||
# to be able to use Chrome browser in emulator
|
|
||||||
#==============================================
|
|
||||||
RUN LATEST_VERSION=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE) \
|
|
||||||
&& wget -nv -O chrome.zip "https://chromedriver.storage.googleapis.com/$LATEST_VERSION/chromedriver_linux64.zip" \
|
|
||||||
&& unzip -x chrome.zip \
|
|
||||||
&& rm chrome.zip
|
|
||||||
|
|
||||||
#================================================
|
|
||||||
# noVNC Default Configurations
|
|
||||||
# These Configurations can be changed through -e
|
|
||||||
#================================================
|
|
||||||
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 \
|
|
||||||
LOG_PATH=/var/log/supervisor
|
|
||||||
|
|
||||||
#===============
|
|
||||||
# Expose Ports
|
|
||||||
#---------------
|
|
||||||
# 4723
|
|
||||||
# Appium port
|
|
||||||
# 6080
|
|
||||||
# noVNC port
|
|
||||||
# 5554
|
|
||||||
# Emulator port
|
|
||||||
# 5555
|
|
||||||
# ADB connection port
|
|
||||||
#===============
|
|
||||||
EXPOSE 4723 6080 5554 5555
|
|
||||||
|
|
||||||
#======================
|
|
||||||
# Add Emulator Devices
|
|
||||||
#======================
|
|
||||||
COPY devices /root/devices
|
|
||||||
|
|
||||||
#===================
|
|
||||||
# Run docker-appium
|
|
||||||
#===================
|
|
||||||
COPY src /root/src
|
|
||||||
COPY supervisord.conf /root/
|
|
||||||
RUN chmod -R +x /root/src && chmod +x /root/supervisord.conf
|
|
||||||
|
|
||||||
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
|
|
76
release.sh
76
release.sh
|
@ -16,15 +16,9 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$3" ]; then
|
if [ -z "$3" ]; then
|
||||||
read -p "Processor type (x86|arm|all): " PROCESSOR
|
|
||||||
else
|
|
||||||
PROCESSOR=$3
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$4" ]; then
|
|
||||||
read -p "Release version: " RELEASE
|
read -p "Release version: " RELEASE
|
||||||
else
|
else
|
||||||
RELEASE=$4
|
RELEASE=$3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
declare -A list_of_levels=(
|
declare -A list_of_levels=(
|
||||||
|
@ -37,11 +31,6 @@ declare -A list_of_levels=(
|
||||||
[8.1]=27
|
[8.1]=27
|
||||||
)
|
)
|
||||||
|
|
||||||
declare -A list_of_processors=(
|
|
||||||
[arm]=armeabi-v7a
|
|
||||||
[x86]=x86
|
|
||||||
)
|
|
||||||
|
|
||||||
function get_android_versions() {
|
function get_android_versions() {
|
||||||
versions=()
|
versions=()
|
||||||
|
|
||||||
|
@ -66,39 +55,15 @@ function get_android_versions() {
|
||||||
echo "Android versions: ${versions[@]}"
|
echo "Android versions: ${versions[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_processors() {
|
|
||||||
processors=()
|
|
||||||
|
|
||||||
if [ "$PROCESSOR" == "all" ]; then
|
|
||||||
for key in "${!list_of_processors[@]}"; do
|
|
||||||
processors+=($key)
|
|
||||||
done
|
|
||||||
else
|
|
||||||
for key in "${!list_of_processors[@]}"; do
|
|
||||||
if [[ $key == *"$PROCESSOR"* ]]; then
|
|
||||||
processors+=($key)
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If version cannot be found in the list
|
|
||||||
if [ -z "$processors" ]; then
|
|
||||||
echo "Invalid processor \"$PROCESSOR\"! Valid options: x86, arm"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Processors: ${processors[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
get_android_versions
|
get_android_versions
|
||||||
get_processors
|
processors=x86
|
||||||
|
|
||||||
function test() {
|
function test() {
|
||||||
# Prepare needed parameter to run tests
|
# Prepare needed parameter to run tests
|
||||||
test_android_version=7.1.1
|
test_android_version=7.1.1
|
||||||
test_api_level=25
|
test_api_level=25
|
||||||
test_processor=x86
|
test_processor=x86
|
||||||
test_sys_img=x86_64
|
test_sys_img=$test_processor
|
||||||
test_img_type=google_apis
|
test_img_type=google_apis
|
||||||
test_browser=chrome
|
test_browser=chrome
|
||||||
test_image=test_img
|
test_image=test_img
|
||||||
|
@ -154,13 +119,8 @@ function build() {
|
||||||
# Remove pyc files
|
# Remove pyc files
|
||||||
find . -name "*.pyc" -exec rm -f {} \;
|
find . -name "*.pyc" -exec rm -f {} \;
|
||||||
|
|
||||||
# Build docker image(s)
|
# Build docker image
|
||||||
for p in "${processors[@]}"; do
|
|
||||||
if [ "$p" == "x86" ]; then
|
|
||||||
FILE_NAME=docker/Emulator_x86
|
FILE_NAME=docker/Emulator_x86
|
||||||
else
|
|
||||||
FILE_NAME=docker/Emulator_arm
|
|
||||||
fi
|
|
||||||
|
|
||||||
for v in "${versions[@]}"; do
|
for v in "${versions[@]}"; do
|
||||||
# Find image type and default web browser
|
# Find image type and default web browser
|
||||||
|
@ -171,58 +131,34 @@ function build() {
|
||||||
# It is because there is no ARM EABI v7a System Image for 6.0
|
# It is because there is no ARM EABI v7a System Image for 6.0
|
||||||
IMG_TYPE=google_apis
|
IMG_TYPE=google_apis
|
||||||
BROWSER=browser
|
BROWSER=browser
|
||||||
elif [[ "${list_of_levels[$v]}" -ge "24" && "$p" == "x86" ]]; then
|
|
||||||
IMG_TYPE=google_apis_playstore
|
|
||||||
BROWSER=chrome
|
|
||||||
else
|
else
|
||||||
IMG_TYPE=google_apis
|
IMG_TYPE=google_apis_playstore
|
||||||
BROWSER=chrome
|
BROWSER=chrome
|
||||||
fi
|
fi
|
||||||
echo "[BUILD] IMAGE TYPE: $IMG_TYPE"
|
echo "[BUILD] IMAGE TYPE: $IMG_TYPE"
|
||||||
level=${list_of_levels[$v]}
|
level=${list_of_levels[$v]}
|
||||||
echo "[BUILD] API Level: $level"
|
echo "[BUILD] API Level: $level"
|
||||||
sys_img=${list_of_processors[$p]}
|
sys_img=$processors
|
||||||
echo "[BUILD] System Image: $sys_img"
|
echo "[BUILD] System Image: $sys_img"
|
||||||
image_version="$IMAGE-$p-$v:$RELEASE"
|
image_version="$IMAGE-$p-$v:$RELEASE"
|
||||||
image_latest="$IMAGE-$p-$v:latest"
|
image_latest="$IMAGE-$p-$v:latest"
|
||||||
if [[ "${list_of_levels[$v]}" -ge "24" && "$p" == "x86" ]]; then
|
|
||||||
image_version="$IMAGE-$p-$v-playstore:$RELEASE"
|
|
||||||
image_latest="$IMAGE-$p-$v-playstore:latest"
|
|
||||||
fi
|
|
||||||
if [[ "${list_of_levels[$v]}" -ge "26" && "$p" == "arm" ]]; then
|
|
||||||
echo "System image $p for $v not supported"
|
|
||||||
echo "Skip building!"
|
|
||||||
else
|
|
||||||
echo "[BUILD] Image name: $image_version and $image_latest"
|
echo "[BUILD] Image name: $image_version and $image_latest"
|
||||||
echo "[BUILD] Dockerfile: $FILE_NAME"
|
echo "[BUILD] Dockerfile: $FILE_NAME"
|
||||||
docker build -t $image_version --build-arg ANDROID_VERSION=$v --build-arg API_LEVEL=$level \
|
docker build -t $image_version --build-arg ANDROID_VERSION=$v --build-arg API_LEVEL=$level \
|
||||||
--build-arg PROCESSOR=$p --build-arg SYS_IMG=$sys_img --build-arg IMG_TYPE=$IMG_TYPE \
|
--build-arg PROCESSOR=$p --build-arg SYS_IMG=$sys_img --build-arg IMG_TYPE=$IMG_TYPE \
|
||||||
--build-arg BROWSER=$BROWSER -f $FILE_NAME .
|
--build-arg BROWSER=$BROWSER -f $FILE_NAME .
|
||||||
docker tag $image_version $image_latest
|
docker tag $image_version $image_latest
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function push() {
|
function push() {
|
||||||
# Push docker image(s)
|
# Push docker image(s)
|
||||||
for p in "${processors[@]}"; do
|
|
||||||
for v in "${versions[@]}"; do
|
for v in "${versions[@]}"; do
|
||||||
image_version="$IMAGE-$p-$v:$RELEASE"
|
image_version="$IMAGE-$p-$v:$RELEASE"
|
||||||
image_latest="$IMAGE-$p-$v:latest"
|
image_latest="$IMAGE-$p-$v:latest"
|
||||||
if [[ "${list_of_levels[$v]}" -ge "24" && "$p" == "x86" ]]; then
|
|
||||||
image_version="$IMAGE-$p-$v-playstore:$RELEASE"
|
|
||||||
image_latest="$IMAGE-$p-$v-playstore:latest"
|
|
||||||
fi
|
|
||||||
if [[ "${list_of_levels[$v]}" -ge "26" && "$p" == "arm" ]]; then
|
|
||||||
echo "docker image $image_version and $image_latest not existed"
|
|
||||||
echo "Skip pushing!"
|
|
||||||
else
|
|
||||||
echo "[PUSH] Image name: $image_version and $image_latest"
|
echo "[PUSH] Image name: $image_version and $image_latest"
|
||||||
docker push $image_version
|
docker push $image_version
|
||||||
docker push $image_latest
|
docker push $image_latest
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ else
|
||||||
echo "Log in to docker hub"
|
echo "Log in to docker hub"
|
||||||
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
||||||
echo "[Version: $ANDROID_VERSION] RUN UNIT TEST, BUILD DOCKER IMAGES AND PUSH THOSE TO DOCKER HUB"
|
echo "[Version: $ANDROID_VERSION] RUN UNIT TEST, BUILD DOCKER IMAGES AND PUSH THOSE TO DOCKER HUB"
|
||||||
bash release.sh all $ANDROID_VERSION all $TRAVIS_TAG
|
bash release.sh all $ANDROID_VERSION $TRAVIS_TAG
|
||||||
elif [ ! -z "$REAL_DEVICE" ]; then
|
elif [ ! -z "$REAL_DEVICE" ]; then
|
||||||
echo "[SUPPORT FOR REAL DEVICE: BUILD DOCKER IMAGES AND PUSH THOSE TO DOCKER HUB ]"
|
echo "[SUPPORT FOR REAL DEVICE: BUILD DOCKER IMAGES AND PUSH THOSE TO DOCKER HUB ]"
|
||||||
bash release_real.sh all $TRAVIS_TAG
|
bash release_real.sh all $TRAVIS_TAG
|
||||||
|
|
Loading…
Reference in a new issue