-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
27 lines (23 loc) · 1.31 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
FROM node:10-alpine
WORKDIR /opt
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-27" \
IONIC_VERSION=5.4.13 \
CORDOVA_VERSION=9.0.0 \
ANT_HOME="/usr/share/ant" \
MAVEN_HOME="/usr/share/maven" \
GRADLE_HOME="/usr/share/gradle" \
ANDROID_HOME="/opt/android"
ENV 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:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/java-1.8-openjdk/jre/bin:/usr/lib/jvm/java-1.8-openjdk/bin:${PATH}"
RUN mkdir android
RUN apk --no-cache --update add curl wget maven apache-ant gradle bash openjdk8 git && \
wget -q -O android/tools.zip ${ANDROID_SDK_URL} && \
unzip -q android/tools.zip -d android/ && \
rm android/tools.zip
RUN apk --no-cache --allow-untrusted -X https://apkproxy.herokuapp.com/sgerrand/alpine-pkg-glibc add glibc glibc-bin
RUN echo y | android update sdk -a -u -t platform-tools,${ANDROID_APIS},build-tools-${ANDROID_BUILD_TOOLS_VERSION}
RUN chmod a+x -R $ANDROID_HOME
RUN chown -R root:root $ANDROID_HOME
RUN npm i -g --unsafe-perm cordova@${CORDOVA_VERSION} ionic@${IONIC_VERSION} && \
npm cache clean --force