-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
86 lines (63 loc) · 3.17 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
FROM ubuntu:16.04
MAINTAINER Claudiu Chiticariu Constatin <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive \
ANDROID_HOME=/opt/android-sdk-linux \
ANDROID_SDK_ROOT=/opt/android-sdk-linux \
NODE_VERSION=10.16.3 \
IONIC_VERSION=5.2.7 \
CORDOVA_VERSION=9.0.0
# Install basics
RUN apt-get update && \
apt-get install -y git wget curl unzip ruby-full build-essential rubygems && \
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 cordova@"$CORDOVA_VERSION" ionic@"$IONIC_VERSION" && \
npm cache verify && \
gem install sass && \
ionic start myApp sidemenu
#ANDROID
#JAVA
# install python-software-properties (so you can do add-apt-repository)
RUN apt-get update && apt-get install -y -q software-properties-common && \
add-apt-repository ppa:webupd8team/java -y && \
echo openjdk-8-jdk shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
apt-get update && apt-get -y install openjdk-8-jdk
#ANDROID STUFF
RUN echo ANDROID_HOME="${ANDROID_HOME}" >> /etc/environment && \
dpkg --add-architecture i386 && \
apt-get update && \
apt-get install -y expect ant wget libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 qemu-kvm kmod && \
apt-get clean && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install Android SDK
#RUN cd /opt && \
# wget --output-document=android-sdk.tgz --quiet http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz && \
# tar xzf android-sdk.tgz && \
# rm -f android-sdk.tgz && \
# chown -R root. /opt
RUN cd /opt && \
mkdir -p android-sdk-linux && \
curl -k https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -o sdk-tools-linux-3859397.zip && \
unzip -q sdk-tools-linux-3859397.zip -d android-sdk-linux && \
rm sdk-tools-linux-3859397.zip
# Setup environment
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:/opt/tools
# Show current directory
RUN pwd
# Install sdk elements
COPY tools /opt/tools
# RUN ["/opt/tools/android-accept-licenses.sh", "android update sdk --all --no-ui --filter platform-tools,tools,build-tools-23.0.2,android-23,extra-android-support,extra-android-m2repository,extra-google-m2repository"]
# RUN ["/opt/tools/install_android_sdk_auto_accept_licenses.sh", "platform-tools,tools,build-tools-28.0.3,android-28,extra-android-support,extra-android-m2repository,extra-google-m2repository"]
# update sdkmanager
# RUN yes | ${ANDROID_HOME}/tools/bin/sdkmanager --update
# install android sdk packages
RUN yes | ${ANDROID_HOME}/tools/bin/sdkmanager --licenses && \
${ANDROID_HOME}/tools/bin/sdkmanager 'build-tools;27.0.3' 'build-tools;28.0.3' platform-tools 'platforms;android-28' 'platforms;android-27' 'platforms;android-26' 'ndk-bundle'
# RUN unzip ${ANDROID_HOME}/temp/*.zip -d ${ANDROID_HOME}
# Install gradle
RUN apt-get update && apt-get install -y -q gradle
WORKDIR myApp
# EXPOSE 8100 35729
# CMD ["ionic", "serve"]