File tree Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Expand file tree Collapse file tree 3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM softsam/android
2
+
3
+ MAINTAINER softsam
4
+
5
+ # Install dependencies for emulator
6
+ RUN echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "SDK Platform Android 4.1.2, API 16" |awk -F'[^0-9]*' '{print $2}' ` && \
7
+ echo y | android update sdk --no-ui --all -t `android list sdk --all|grep "ARM EABI v7a System Image, Android API 16" |awk -F'[^0-9]*' '{print $2}' `
8
+
9
+ # Expose android port
10
+ EXPOSE 5555
11
+
12
+ RUN echo n | android create avd --force -n "ANDROID" -t android-16
13
+
14
+ # Add script
15
+ ADD start.sh /start.sh
16
+ RUN chmod +x /start.sh
17
+ CMD /start.sh
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Detect ip and forward ADB ports outside to outside interface
4
+ ip=$( ip addr list eth0| grep " inet " | cut -d' ' -f6| cut -d/ -f1)
5
+ # socat tcp-listen:5555,bind=$ip,fork tcp:127.0.0.1:5555 &
6
+ redir --laddr=$ip --lport=5555 --caddr=127.0.0.1 --cport=5555 &
7
+
8
+ # Set up and run emulator
9
+ emulator -avd ANDROID -noaudio -no-window -gpu off -verbose -force-32bit
Original file line number Diff line number Diff line change
1
+ FROM debian:latest
2
+
3
+ MAINTAINER softsam
4
+
5
+ # Install all dependencies
6
+ RUN apt-get update && \
7
+ apt-get install -y wget openjdk-7-jre-headless libc6-i386 lib32stdc++6 redir && \
8
+ apt-get clean && \
9
+ apt-get autoclean && \
10
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
11
+
12
+ # Install android tools + sdk
13
+ ENV ANDROID_HOME /opt/android-sdk-linux
14
+ ENV PATH $PATH:${ANDROID_HOME}/tools:$ANDROID_HOME/platform-tools
15
+
16
+ RUN wget -qO- "http://dl.google.com/android/android-sdk_r24.3.3-linux.tgz" | tar -zx -C /opt && \
17
+ echo y | android update sdk --no-ui --all --filter platform-tools --force
You can’t perform that action at this time.
0 commit comments