Commit | Line | Data |
---|---|---|
1200c1eb S |
1 | # Official repo only has a ppa for postgresql 9.3 at the moment (14/3/2014) |
2 | # When new LTS ships we can upgrade | |
3 | ||
4 | # VERSION 0.2.0 | |
025a598b | 5 | FROM ubuntu:14.04 |
1200c1eb S |
6 | |
7 | MAINTAINER Sam Saffron "https://twitter.com/samsaffron" | |
8 | ||
9 | RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\ | |
10 | apt-get -y install fping &&\ | |
11 | sh -c "fping proxy && echo 'Acquire { Retries \"0\"; HTTP { Proxy \"http://proxy:3128\";}; };' > /etc/apt/apt.conf.d/40proxy || true" &&\ | |
12 | apt-get -y update &&\ | |
025a598b | 13 | apt-get -y install software-properties-common &&\ |
1200c1eb S |
14 | add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe" &&\ |
15 | add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates main universe" &&\ | |
16 | apt-get -y update &&\ | |
17 | apt-mark hold initscripts &&\ | |
18 | apt-get -y upgrade &&\ | |
19 | add-apt-repository -y ppa:rwky/redis &&\ | |
20 | add-apt-repository -y ppa:nginx/stable &&\ | |
21 | apt-get install -y curl && curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - &&\ | |
025a598b | 22 | echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | \ |
1200c1eb S |
23 | tee /etc/apt/sources.list.d/postgres.list &&\ |
24 | apt-get -y update &&\ | |
25 | apt-get -y install build-essential git curl wget \ | |
26 | libxslt-dev libcurl4-openssl-dev \ | |
27 | libssl-dev libyaml-dev libtool \ | |
28 | libxml2-dev gawk \ | |
29 | pngcrush imagemagick \ | |
30 | postgresql-9.3 postgresql-client-9.3 \ | |
31 | postgresql-contrib-9.3 libpq-dev libreadline-dev \ | |
32 | nginx language-pack-en sudo cron \ | |
33 | psmisc rsyslog &&\ | |
34 | dpkg-divert --local --rename --add /sbin/initctl &&\ | |
35 | sh -c "test -f /sbin/initctl || ln -s /bin/true /sbin/initctl" &&\ | |
36 | apt-get -y install redis-server haproxy openssh-server &&\ | |
37 | echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\ | |
38 | mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\ | |
39 | cd /src/ruby-build && ./install.sh &&\ | |
40 | cd / && rm -rf /src/ruby-build &&\ | |
51c31933 S |
41 | echo install_package "yaml-0.1.6" "http://pyyaml.org/download/libyaml/yaml-0.1.6.tar.gz#5fe00cda18ca5daeb43762b80c38e06e" --if needs_yaml > /src/2.1.2.discourse &&\ |
42 | echo install_package "openssl-1.0.1g" "https://www.openssl.org/source/openssl-1.0.1g.tar.gz#de62b43dfcd858e66a74bee1c834e959" mac_openssl --if has_broken_mac_openssl >> /src/2.1.2.discourse &&\ | |
43 | echo install_package "ruby-v_2_1_2_discourse" "https://github.com/SamSaffron/ruby/archive/v_2_1_2_discourse.tar.gz#98741e3cbfd00ae2931b2c0edb0f0698" ldflags_dirs standard verify_openssl >> /src/2.1.2.discourse &&\ | |
1200c1eb | 44 | apt-get -y install ruby bison &&\ |
51c31933 | 45 | ruby-build /src/2.1.2.discourse /usr/local &&\ |
1200c1eb S |
46 | apt-get -y remove ruby1.8 &&\ |
47 | gem update --system &&\ | |
48 | gem install bundler &&\ | |
49 | cd / && git clone https://github.com/SamSaffron/pups.git &&\ | |
50 | mkdir /jemalloc && cd /jemalloc &&\ | |
51 | wget http://www.canonware.com/download/jemalloc/jemalloc-3.4.1.tar.bz2 &&\ | |
52 | tar -xvjf jemalloc-3.4.1.tar.bz2 && cd jemalloc-3.4.1 && ./configure && make &&\ | |
53 | mv lib/libjemalloc.so.1 /usr/lib && cd / && rm -rf /jemalloc &&\ | |
54 | apt-get -y install runit monit socat &&\ | |
55 | apt-get clean &&\ | |
56 | rm -f /etc/apt/apt.conf.d/40proxy &&\ | |
025a598b | 57 | locale-gen en_US &&\ |
0b490e87 S |
58 | mkdir -p /etc/runit/1.d &&\ |
59 | wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\ | |
5d6f9ed2 RH |
60 | tar -xjf phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\ |
61 | rm phantomjs-1.9.7-linux-x86_64.tar.bz2 &&\ | |
62 | cp phantomjs-1.9.7-linux-x86_64/bin/phantomjs /bin/phantomjs &&\ | |
63 | rm -fr phantomjs-1.9.7-linux-x86_64 &&\ | |
64 | wget http://static.jonof.id.au/dl/kenutils/pngout-20130221-linux.tar.gz &&\ | |
65 | tar -xvf pngout-20130221-linux.tar.gz &&\ | |
66 | rm pngout-20130221-linux.tar.gz &&\ | |
67 | cp pngout-20130221-linux/x86_64/pngout /bin/pngout &&\ | |
68 | rm -rf pngout-20130221-linux | |
025a598b S |
69 | |
70 | ADD runit-1 /etc/runit/1 | |
71 | ADD runit-1.d-cleanup-pids /etc/runit/1.d/cleanup-pids | |
72 | ADD runit-2 /etc/runit/2 |