forked from joemccann/dillinger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (43 loc) · 1.38 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
# Dillinger Docker File
#
# Installs dillinger on a container
#
# VERSION 0.0.0
from ubuntu
maintainer Nuno Job "[email protected]"
#
# update apr
#
run echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
run apt-get upgrade
run apt-get update
#
# base dependencies
#
run apt-get install -y build-essential chrpath git-core libssl-dev libfontconfig1-dev curl xvfb gtk2-engines-pixbuf xfonts-100dpi x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic libqt4-dev libqtwebkit-dev qt4-qmake python-qt4
#
# install node
#
run cd /usr/local && curl http://nodejs.org/dist/v0.10.15/node-v0.10.15-linux-x64.tar.gz | tar --strip-components=1 -zxf- && cd
run npm -g update npm
run npm install -g forever
#
# install phantomjs
#
run apt-get install -y wget
run mkdir -p /opt/install && cd /opt/install && wget https://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2 && tar xvf phantomjs-1.9.1-linux-x86_64.tar.bz2 && cd phantomjs-*-linux-x86_64 && echo 'export PATH='$(pwd)'/bin:'$PATH >> ~/.profile
run /bin/bash -c "source ~/.profile"
#
# install the app
#
run mkdir -p /opt/install/dillinger
add . /opt/install/dillinger
run cd /opt/install/dillinger && npm install
#
# port 8080 exposed by default, can be overriden with -p machine:container
#
expose 8080
#
# how to do docker run
#
cmd forever /opt/install/dillinger/app.js