forked from budtmo/docker-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
genymotion
66 lines (59 loc) · 1.88 KB
/
genymotion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
ARG DOCKER_ANDROID_VERSION
FROM budtmo/docker-android:base_${DOCKER_ANDROID_VERSION}
#===================================================
# Install Genymotion CLI
# (for user management and deployment on Geny Cloud)
#===================================================
ENV GMSAAS_CLI_VERSION="1.7.1"
RUN pip install gmsaas==${GMSAAS_CLI_VERSION}
#================
# Cloud Packages
#----------------
# keychain
# ssh-key generator
#================
RUN apt-get -qqy update && apt-get -qqy install --no-install-recommends \
keychain \
&& apt autoremove -y \
&& apt clean all \
&& rm -rf /var/lib/apt/lists/*
#=========================================
# Install Terraform
# (for deployment on other cloud services)
#=========================================
ENV TERRAFORM_VERSION=1.4.6
RUN wget -nv -O terraform.zip "https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip" \
&& unzip -x terraform.zip \
&& mv terraform /usr/local/bin \
&& rm terraform.zip
#==========
# Copy app
#==========
RUN rm -rf ${SCRIPT_PATH}
ENV SCRIPT_PATH="docker-android"
ENV WORK_PATH="/home/androidusr"
ENV APP_PATH=${WORK_PATH}/${SCRIPT_PATH}
RUN mkdir -p ${APP_PATH}
COPY mixins ${APP_PATH}/mixins
COPY cli ${APP_PATH}/cli
RUN chown -R 1300:1301 ${APP_PATH} \
&& pip install --quiet -e ${APP_PATH}/cli
#===================================
# Create Genymotion Template folder
#===================================
ENV GENYMOTION_TEMPLATE_PATH=${WORK_PATH}/genymotion_template
RUN mkdir -p ${GENYMOTION_TEMPLATE_PATH}
#==================
# Use created user
#==================
USER 1300:1301
ENV LOG_PATH=${WORK_PATH}/logs \
WEB_LOG_PORT=9000
EXPOSE 9000
RUN mkdir -p ${LOG_PATH}
#=========
# Run App
#=========
STOPSIGNAL SIGTERM
RUN gmsaas config set android-sdk-path ${ANDROID_HOME}
ENTRYPOINT ["/home/androidusr/docker-android/mixins/scripts/run.sh"]