forked from geteduroam/ionic-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
50 lines (37 loc) · 1.46 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
FROM cangol/android-gradle
ARG NODE_VERSION=12.13.0
ARG IONIC_VERSION=5.17.1
ARG ANDROID_SDK_VERSION=24.4.1
ARG ANDROID_HOME=/opt/android-sdk-linux
ARG GRADLE_VERSION=6.0
ARG PASS_PHRASE=emergya
ARG RELEASE=1.0.0
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}
# 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 && \
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@"$IONIC_VERSION"
# Setup environment
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:/opt/tools:/opt/gradle/gradle-"$GRADLE_VERSION"/bin
#Copy de sorce folder
COPY src/ /home/gradle/myApp/
#Copy de key from tools to sign the apk
COPY tools/release-key.jks /release-key.jks
#Copy the entrypoint from tools to let the docker work
COPY tools/entrypoint.sh /entrypoint.sh
#Run the entry point
ENTRYPOINT ["/bin/bash","/entrypoint.sh"]