FROM appium/appium:v3.4.2-p0

ARG AUTHORS="Budi Utomo"
LABEL author="${AUTHORS} <budtmo.os@gmail.com>"

USER root

#================
# Basic Packages
#----------------
# ca-certificates
#   SSL client
# python3-pip
#   python-pip
# socat
#   Port forwarder
# supervisor
#   Process manager
# unzip
#   Unzip zip file
# wget
#   Network downloader
#================
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
    ca-certificates \
    python3-pip \
    socat \
    supervisor \
    unzip \
    wget \
 && apt autoremove -y \
 && apt clean all \
 && rm -rf /var/lib/apt/lists/* \
 && update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 1

#=====================
# Set release version
#=====================
ARG DOCKER_ANDROID_VERSION=test-version
ENV DOCKER_ANDROID_VERSION=${DOCKER_ANDROID_VERSION}

#===============
# Expose Ports
#---------------
# 4723
#   Appium port
# 5554
#   Emulator port
# 5555
#   ADB connection port
#===============
EXPOSE 4723 5554 5555
