-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
33 lines (25 loc) · 1.29 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
FROM rahulcv/java
LABEL maintainer="[email protected]"
ENV ANDROID_SDK_URL="https://dl.google.com/android/repository/tools_r25.2.5-linux.zip" \
ANDROID_BUILD_TOOLS_VERSION=27.0.0 \
ANDROID_APIS="android-10,android-15,android-16,android-17,android-18,android-19,android-20,android-21,android-22,android-23,android-24,android-25,android-26" \
ANT_HOME="/usr/share/ant" \
MAVEN_HOME="/usr/share/maven" \
GRADLE_HOME="/usr/share/gradle" \
ANDROID_HOME="/opt/android"
ENV PATH $PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION:$ANT_HOME/bin:$MAVEN_HOME/bin:$GRADLE_HOME/bin
WORKDIR /opt
RUN dpkg --add-architecture i386 && \
apt-get -qq update && \
apt-get -qq install -y wget curl maven ant gradle libncurses5:i386 libstdc++6:i386 zlib1g:i386 && \
# Installs Android SDK
mkdir android && cd android && \
wget -O tools.zip ${ANDROID_SDK_URL} && \
unzip tools.zip && rm tools.zip && \
echo y | android update sdk -a -u -t platform-tools,${ANDROID_APIS},build-tools-${ANDROID_BUILD_TOOLS_VERSION} && \
chmod a+x -R $ANDROID_HOME && \
chown -R root:root $ANDROID_HOME && \
# Clean up
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
apt-get autoremove -y && \
apt-get clean