-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile-front
More file actions
97 lines (71 loc) · 2.6 KB
/
dockerfile-front
File metadata and controls
97 lines (71 loc) · 2.6 KB
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
87
88
89
90
91
92
93
94
95
96
FROM ubuntu:17.04
MAINTAINER juliandondero@gmail.com
RUN useradd -ms /bin/bash user
USER user
WORKDIR /home/user
ENV NODE_VERSION 6.10.3
ENV DEBIAN_FRONTEND=noninteractive
ENV ANDROID_HOME=/opt/android-sdk-linux
USER root
# supervisord from ubuntu repository
RUN apt-get update && apt-get install -y supervisor
RUN apt-get install -y apt-utils
RUN apt-get install -y git-core
RUN apt-get install -y ca-certificates
RUN apt-get install -y ssh
RUN apt-get install -y curl
RUN apt-get install -y vim
RUN apt-get install -y automake
RUN apt-get install -y autoconf
RUN apt-get install -y build-essential
RUN apt-get install -y python-dev
RUN apt-get install -y software-properties-common
RUN apt-get update -qq \
&& apt-get install -y openjdk-8-jdk wget expect unzip vim \
&& apt-get clean
RUN apt-get install -y gradle
COPY ./scripts/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN git clone https://github.com/facebook/watchman.git && \
cd watchman && \
git checkout v4.7.0 && \
./autogen.sh && \
./configure && \
make && \
make install
ADD ssh/ /home/user/.ssh/
RUN chmod 600 /home/user/.ssh/*
RUN ssh-keyscan github.com > /home/user/.ssh/known_hosts
RUN chown user:user /home/user/.ssh/*
# Install Java.
RUN \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
add-apt-repository -y ppa:webupd8team/java && \
add-apt-repository -y ppa:cwchien/gradle && \
apt-get update && \
apt-get install -y oracle-java8-installer && \
apt-get install -y gradle && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
USER user
WORKDIR /home/user
RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash \
&& /bin/bash -c "source ~/.bashrc && source /home/user/.nvm/nvm.sh && nvm install $NODE_VERSION && nvm alias default $NODE_VERSION && nvm use default && npm install npm@latest -g && npm install bower -g && npm install -g ember-cli && npm install -g less && npm install -g cordova@6.5.0"
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools
USER root
# --- Download Android SDK tools
# RUN useradd -u 1000 -M -s /bin/bash user
RUN chown 1000 /opt
COPY tools /opt/tools
COPY licenses /opt/licenses
RUN mkdir -p /opt/android-sdk-linux
RUN "/opt/tools/android-sdk-update.sh"
RUN chown 1000 /opt/android-sdk-linux
USER user
RUN ${ANDROID_HOME}/tools/bin/sdkmanager "build-tools;26.0.1"
USER root
RUN usermod -aG plugdev user
RUN adb kill-server
RUN adb start-server
CMD ["/usr/bin/supervisord"]