-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
59 lines (42 loc) · 1.4 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
FROM openkbs/jdk-mvn-py3
MAINTAINER DrSnowbird "[email protected]"
#### ------------------------
#### ---- user: Non-Root ----
#### ------------------------
USER ${USER}
WORKDIR ${HOME}
RUN mkdir -p ${HOME}/workspace && \
chown ${USER}:${USER} -R ${HOME}/workspace
#### --- Copy Entrypoint script in the container ---- ####
COPY ./docker-entrypoint.sh /
#### ---- EMP3 Install ----
RUN git clone https://github.com/missioncommand/emp3-web.git
WORKDIR ${HOME}/emp3-web
#### --- Enterpoint for container ---- ####
USER ${USER}
# grunt is at /home/developer/.npm-global/bin/grunt
RUN cd ${HOME}/emp3-web && \
export PATH=$PATH && \
sudo chown -R ${USER}:${USER} ${HOME} ${HOME}/.npm && \
npm install -g grunt-cli && \
npm install && \
grunt --force && \
sudo chown -R ${USER}:${USER} /usr/lib/node_modules ${HOME}/.npm
RUN sudo ln -s `which grunt` /usr/bin/grunt && \
echo "grunt at: `which grunt`"
RUN sudo apt-get update && sudo apt-get install -y nginx curl dnsmasq
COPY ./nginx-conf/emp3-reverse-proxy.conf /etc/nginx/conf.d/
EXPOSE 3000
EXPOSE 3100
EXPOSE 8080
####################################
#### ---- Enterpoint setup ---- ####
####################################
RUN sudo chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["grunt", "serve"]
#ENTRYPOINT ["/usr/bin/grunt"]
#CMD ["serve"]
#### (Test only)
#CMD ["/usr/bin/firefox"]
#CMD ["/bin/bash"]