forked from eclipsesource/tabris-js-hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (42 loc) · 2.07 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 openjdk:8u131-jdk-alpine
FROM openjdk:8u141-jdk
# we need unzip, git, node and npm
#RUN apk --update add unzip && rm -rf /var/lib/apt/lists/* && rm /var/cache/apk/*
#RUN apk --update add git && rm -rf /var/lib/apt/lists/* && rm /var/cache/apk/*
#RUN apk --update add nodejs nodejs-npm && rm -rf /var/lib/apt/lists/* && rm /var/cache/apk/*
RUN apt-get update
RUN apt-get install unzip
RUN apt-get install git
# install the Android SDK
ENV ANDROID_HOME /var/android_home
ADD https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip .
RUN unzip sdk-tools-linux-3859397.zip -d ${ANDROID_HOME} && rm sdk-tools-linux-3859397.zip
RUN mkdir -p "${ANDROID_HOME}/licenses"
RUN echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "${ANDROID_HOME}/licenses/android-sdk-license"
RUN echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "${ANDROID_HOME}/licenses/android-sdk-preview-license"
# https://developer.android.com/studio/command-line/sdkmanager.html
# - platform-tools
RUN ${ANDROID_HOME}/tools/bin/sdkmanager "platform-tools"
# - android-25
RUN ${ANDROID_HOME}/tools/bin/sdkmanager "platforms;android-25"
# - build-tools-25.0.2
RUN ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;25.0.2"
# - extra-android-m2repository
RUN ${ANDROID_HOME}/tools/bin/sdkmanager "extras;android;m2repository"
# - extra-google-m2repository
RUN ${ANDROID_HOME}/tools/bin/sdkmanager "extras;google;m2repository"
# https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
# install Tabris CLI and dependencies
RUN npm install -g [email protected]
RUN npm install -g tabris-cli@~2.0.4
RUN npm install typescript -g
# install Gradle
ENV GRADLE_VERSION 3.5
ENV GRADLE_HOME /var/gradle-${GRADLE_VERSION}
ADD https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip .
RUN unzip gradle-${GRADLE_VERSION}-bin.zip -d /var && rm gradle-${GRADLE_VERSION}-bin.zip
RUN ln -s /var/gradle-${GRADLE_VERSION}/bin/gradle /usr/bin/
WORKDIR /workspace
VOLUME ["/workspace"]