forked from dustinblackman/phantomized
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (22 loc) · 870 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
FROM ubuntu:14.04
MAINTAINER Gravebot
# Setup system deps
RUN apt-get update
RUN apt-get -y install build-essential curl rsync tar python python-pip git libfontconfig1
# Setup Node
ENV NODE_VERSION 4.4.2
ENV NPM_VERSION 3.8.5
RUN git clone https://github.com/creationix/nvm.git /.nvm
RUN echo "source /.nvm/nvm.sh" >> /etc/bash.bashrc
RUN /bin/bash -c 'source /.nvm/nvm.sh && nvm install $NODE_VERSION && nvm use $NODE_VERSION && nvm alias default $NODE_VERSION && ln -s /.nvm/versions/node/v$NODE_VERSION/bin/node /usr/local/bin/node && ln -s /.nvm/versions/node/v$NODE_VERSION/bin/npm /usr/local/bin/npm'
RUN npm install -g npm@$NPM_VERSION
# Setup dockerize
RUN pip install dockerize
# Copy package.json
COPY ./package.json /app/
WORKDIR /app/
# Install node deps
RUN npm install --production
# Copy script
COPY ./index.js /app/
CMD ["npm", "run", "create"]