forked from geteduroam/ionic-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
53 lines (41 loc) · 1.69 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
FROM cangol/android-gradle
ARG NODE_VERSION=12.13.0
ARG IONIC_VERSION=6.11.0
ARG ANDROID_SDK_VERSION=28.0.3
ARG ANDROID_HOME=/android-sdk-linux
ARG GRADLE_VERSION=6.0
ARG PASS_PHRASE=emergya
ARG RELEASE=1.0.0
ARG TARGET_SDK=28
ENV NODE_VERSION ${NODE_VERSION}
ENV IONIC_VERSION ${IONIC_VERSION}
ENV ANDROID_SDK_VERSION ${ANDROID_SDK_VERSION}
ENV ANDROID_HOME ${ANDROID_HOME}
ENV GRADLE_VERSION ${GRADLE_VERSION}
#ENV LOCAL_KEY_FILE ${LOCAL_KEY_FILE}
ENV PASS_PHRASE ${PASS_PHRASE}
ENV RELEASE ${RELEASE}
ENV TARGET_SDK ${TARGET_SDK}
ENV PATH $PATH:${ANDROID_HOME}/build-tools/${BUILD_TOOLS}
# Set time zone
ENV TimeZone=Europe/Stockholm
RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone
WORKDIR /home/gradle
# Install Node
RUN apt-get update && \
echo y | $ANDROID_HOME/tools/android update sdk --all --filter build-tools-${ANDROID_SDK_VERSION} --no-ui && \
apt-get install -y wget curl unzip build-essential gcc make && \
curl --retry 3 -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" && \
tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 && \
rm "node-v$NODE_VERSION-linux-x64.tar.gz" && \
npm install -g @ionic/cli@"$IONIC_VERSION"
# Setup environment
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:/opt/tools:/opt/gradle/gradle-"$GRADLE_VERSION"/bin
#Copy the source folder
COPY geteduroam/ /home/gradle/myApp/
#Copy the Snakeoil key to sign the apk
COPY contrib/release-key.jks /release-key.jks
#Copy the entrypoint from tools to let the docker work
COPY contrib/entrypoint.sh /entrypoint.sh
#Run the entry point
ENTRYPOINT ["/bin/bash","/entrypoint.sh"]