-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
50 lines (39 loc) · 1.67 KB
/
Dockerfile
File metadata and controls
50 lines (39 loc) · 1.67 KB
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
FROM softsam/adb:latest
MAINTAINER softsam
# Install all dependencies
RUN apt-get update && \
apt-get install -y python make g++ lib32z1 supervisor zip unzip && \
apt-get clean && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install android tools + sdk
# SDK 17 is needed for Selendroid (you can install any SDK >= 17)
RUN echo y | android update sdk --no-ui --all --filter build-tools-23.0.0 --force && \
echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 4.2.2, API 17"|awk -F'[^0-9]*' '{print $2}'` && \
rm -rf /tmp/*
# Create applicative user
RUN useradd -m -s /bin/bash appium
USER appium
# Install NodeJs
ENV node_version v0.12.7
RUN wget -qO- -P /home/appium https://nodejs.org/dist/${node_version}/node-${node_version}.tar.gz | tar -zx -C /home/appium && \
cd /home/appium/node-${node_version}/ && ./configure --prefix=/home/appium/apps && make && make install && \
rm -rf /home/appium/node-${node_version} /tmp/*
# Install appium
ENV PATH $PATH:/home/appium/apps/bin
RUN /home/appium/apps/bin/npm install -g appium && \
rm -rf /tmp/*
# BUGFIX: Add fixed unlock (current one not working with SDK 21 - tested on emulators)
RUN rm /home/appium/apps/lib/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk
ADD unlock_apk-debug.apk /home/appium/apps/lib/node_modules/appium/build/unlock_apk/
USER root
# APK directory for appium
RUN mkdir /apk && chown appium /apk
VOLUME /apk
# Expose appium server
EXPOSE 4723
# Configure supervisor
RUN mkdir -p /var/log/supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Run supervisor
CMD ["/usr/bin/supervisord"]