-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
33 lines (26 loc) · 972 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
FROM debian
MAINTAINER Love Nyberg "[email protected]"
ENV REFRESHED_AT 2014-09-30
# Update the package repository
RUN apt-get update -qq && \
apt-get upgrade -yqq
# Compiling and installing node.js
RUN DEBIAN_FRONTEND=noninteractive apt-get install -yqq wget curl python g++ make checkinstall fakeroot && \
apt-get -yqq clean && \
src=$(mktemp -d) && cd $src && \
wget -N http://nodejs.org/dist/node-latest.tar.gz && \
tar xzvf node-latest.tar.gz && cd node-v* && \
./configure && \
fakeroot checkinstall -y --install=no --pkgversion $(echo $(pwd) | sed -n -re's/.+node-v(.+)$/\1/p') make -j$(($(nproc)+1)) install && \
dpkg -i node_*
# Installing possible node executers
RUN npm install -g nodemon forever
# Add node application into container
ADD src /var/www
# Install node dependences
RUN cd /var/www && npm install
# Expose application port
EXPOSE 8080
# Add docker start script
ADD start.sh /start.sh
CMD ["bash", "start.sh"]