-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the SDK tools to install ADB, since it's no longer available in a…
… bundle. Image size goes up but we gain access to the rest of the platform-tools/ and tools/.
- Loading branch information
Showing
1 changed file
with
14 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,31 @@ | ||
FROM ubuntu:14.04 | ||
MAINTAINER Simo Kinnunen | ||
|
||
# Stop debconf from complaining about missing frontend | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
# 32-bit libraries and build deps for ADB | ||
RUN dpkg --add-architecture i386 && \ | ||
apt-get update && \ | ||
apt-get -y install libc6:i386 libstdc++6:i386 && \ | ||
apt-get -y install wget unzip | ||
|
||
# Install ADB | ||
RUN wget --progress=dot:giga -O /opt/adt.zip \ | ||
http://dl.google.com/android/adt/adt-bundle-linux-x86_64-20140702.zip && \ | ||
unzip /opt/adt.zip adt-bundle-linux-x86_64-20140702/sdk/platform-tools/adb -d /opt && \ | ||
mv /opt/adt-bundle-linux-x86_64-20140702 /opt/adt && \ | ||
rm /opt/adt.zip && \ | ||
ln -s /opt/adt/sdk/platform-tools/adb /usr/local/bin/adb | ||
|
||
# Set up insecure default key | ||
RUN mkdir -m 0750 /.android | ||
ADD files/insecure_shared_adbkey /.android/adbkey | ||
ADD files/insecure_shared_adbkey.pub /.android/adbkey.pub | ||
|
||
# Clean up | ||
RUN apt-get -y --purge remove wget unzip && \ | ||
apt-get -y autoremove && \ | ||
# Note: ADB needs 32-bit libs | ||
RUN export DEBIAN_FRONTEND=noninteractive && \ | ||
dpkg --add-architecture i386 && \ | ||
apt-get update && \ | ||
apt-get -y install libc6:i386 libstdc++6:i386 && \ | ||
apt-get -y install wget unzip openjdk-7-jre-headless && \ | ||
wget --progress=dot:giga -O /opt/adt.tgz \ | ||
https://dl.google.com/android/android-sdk_r24.0.2-linux.tgz && \ | ||
tar xzf /opt/adt.tgz -C /opt && \ | ||
rm /opt/adt.tgz && \ | ||
echo y | /opt/android-sdk-linux/tools/android update sdk --filter platform-tools --no-ui --force && \ | ||
apt-get clean && \ | ||
rm -rf /var/cache/apt/* | ||
|
||
# Expose default ADB port | ||
EXPOSE 5037 | ||
|
||
# Set up PATH | ||
ENV PATH $PATH:/opt/android-sdk-linux/platform-tools:/opt/android-sdk-linux/tools | ||
|
||
# Start the server by default. This needs to run in a shell or Ctrl+C won't | ||
# work. | ||
CMD /usr/local/bin/adb -a -P 5037 fork-server server |