forked from TNOCS/csWeb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (25 loc) · 914 Bytes
/
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
FROM phusion/baseimage:latest
MAINTAINER Berend Weel <[email protected]>
# Keep ssh running
RUN rm -f /etc/service/sshd/down
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN apt-get update && apt-get install -y nodejs nodejs-legacy npm git libsass-dev
RUN npm i -g npm
RUN npm i -g n
RUN n latest
RUN npm i -g [email protected] bower nodemon http-server gulp [email protected] [email protected] [email protected]
RUN /usr/sbin/useradd -p $(openssl passwd simcity) -d /home/simcity -m --shell /bin/bash simcity
WORKDIR /home/simcity/
COPY . csWeb/
RUN chown simcity:simcity -R /home/simcity
USER simcity
RUN mkdir ~/npm && echo "prefix = ~/npm" > ~/.npmrc && echo "export PATH=~/npm/bin:$PATH" >> ~/.profile && . ~/.profile
WORKDIR /home/simcity/csWeb
RUN npm install
RUN bower install
RUN gulp init
RUN bower link
WORKDIR /home/simcity/csWeb/out/csServerComp
RUN npm link
USER root
CMD ["/sbin/my_init"]