-
Notifications
You must be signed in to change notification settings - Fork 74
/
Dockerfile
35 lines (29 loc) · 1.26 KB
/
Dockerfile
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
FROM alpine:3.6
# Set up insecure default key
RUN mkdir -m 0750 /root/.android
ADD files/insecure_shared_adbkey /root/.android/adbkey
ADD files/insecure_shared_adbkey.pub /root/.android/adbkey.pub
ADD files/update-platform-tools.sh /usr/local/bin/update-platform-tools.sh
RUN set -xeo pipefail && \
apk update && \
apk add wget ca-certificates tini && \
wget -O "/etc/apk/keys/sgerrand.rsa.pub" \
"https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub" && \
wget -O "/tmp/glibc.apk" \
"https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk" && \
wget -O "/tmp/glibc-bin.apk" \
"https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-bin-2.28-r0.apk" && \
apk add "/tmp/glibc.apk" "/tmp/glibc-bin.apk" && \
rm "/etc/apk/keys/sgerrand.rsa.pub" && \
rm "/root/.wget-hsts" && \
rm "/tmp/glibc.apk" "/tmp/glibc-bin.apk" && \
rm -r /var/cache/apk/APKINDEX.* && \
/usr/local/bin/update-platform-tools.sh
# Expose default ADB port
EXPOSE 5037
# Set up PATH
ENV PATH $PATH:/opt/platform-tools
# Hook up tini as the default init system for proper signal handling
ENTRYPOINT ["/sbin/tini", "--"]
# Start the server by default
CMD ["adb", "-a", "-P", "5037", "server", "nodaemon"]