Commit | Line | Data |
---|---|---|
b404fee4 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 | |
2bdce9f4 | 3 | |
be82e068 | 4 | # NAME: discourse_base |
fac2c9eb | 5 | # VERSION: 1.0.7 |
be82e068 | 6 | |
025a598b | 7 | FROM ubuntu:14.04 |
e1903539 SS |
8 | |
9 | MAINTAINER Sam Saffron "https://twitter.com/samsaffron" | |
10 | ||
0b0d6fcb | 11 | RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\ |
e56a65f6 MB |
12 | echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main restricted universe" > /etc/apt/sources.list &&\ |
13 | echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates main restricted universe" >> /etc/apt/sources.list &&\ | |
14 | echo "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-security main restricted universe" >> /etc/apt/sources.list &&\ | |
15 | apt-get update && apt-get -y install fping &&\ | |
16 | sh -c "fping proxy && echo 'Acquire { Retries \"0\"; HTTP { Proxy \"http://proxy:3128\";}; };' > /etc/apt/apt.conf.d/40proxy && apt-get update || true" &&\ | |
025a598b | 17 | apt-get -y install software-properties-common &&\ |
2bdce9f4 MB |
18 | apt-mark hold initscripts &&\ |
19 | apt-get -y upgrade &&\ | |
e1903539 | 20 | add-apt-repository -y ppa:rwky/redis &&\ |
6f85e815 | 21 | add-apt-repository -y ppa:nginx/development &&\ |
b404fee4 | 22 | apt-get install -y curl && curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - &&\ |
025a598b | 23 | echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" | \ |
e56a65f6 | 24 | tee /etc/apt/sources.list.d/postgres.list &&\ |
edcdd0c9 | 25 | curl -sL https://deb.nodesource.com/setup | sudo bash - &&\ |
e1903539 | 26 | apt-get -y update &&\ |
d08dd53f RH |
27 | apt-get -y install build-essential git curl wget \ |
28 | libxslt-dev libcurl4-openssl-dev \ | |
29 | libssl-dev libyaml-dev libtool \ | |
30 | libxml2-dev gawk \ | |
31 | pngcrush imagemagick \ | |
b404fee4 S |
32 | postgresql-9.3 postgresql-client-9.3 \ |
33 | postgresql-contrib-9.3 libpq-dev libreadline-dev \ | |
df684d76 | 34 | nginx language-pack-en sudo cron anacron \ |
be82e068 | 35 | psmisc rsyslog vim &&\ |
e56a65f6 | 36 | sed -i.bak 's/$ModLoad imklog/#$ModLoad imklog/' /etc/rsyslog.conf &&\ |
e1903539 | 37 | dpkg-divert --local --rename --add /sbin/initctl &&\ |
2bdce9f4 | 38 | sh -c "test -f /sbin/initctl || ln -s /bin/true /sbin/initctl" &&\ |
d08dd53f | 39 | apt-get -y install redis-server haproxy openssh-server &&\ |
be82e068 | 40 | cd / &&\ |
e1903539 SS |
41 | mkdir /jemalloc && cd /jemalloc &&\ |
42 | wget http://www.canonware.com/download/jemalloc/jemalloc-3.4.1.tar.bz2 &&\ | |
e8f79810 | 43 | tar -xjf jemalloc-3.4.1.tar.bz2 && cd jemalloc-3.4.1 && ./configure && make &&\ |
e1903539 | 44 | mv lib/libjemalloc.so.1 /usr/lib && cd / && rm -rf /jemalloc &&\ |
2cc4e49f | 45 | apt-get -y install runit monit socat &&\ |
23022c1d | 46 | mkdir -p /etc/runit/1.d &&\ |
d08dd53f | 47 | apt-get clean &&\ |
2bdce9f4 | 48 | rm -f /etc/apt/apt.conf.d/40proxy &&\ |
be82e068 | 49 | locale-gen en_US &&\ |
6f85e815 S |
50 | wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2 &&\ |
51 | tar -xjf phantomjs-1.9.8-linux-x86_64.tar.bz2 &&\ | |
52 | rm phantomjs-1.9.8-linux-x86_64.tar.bz2 &&\ | |
53 | cp phantomjs-1.9.8-linux-x86_64/bin/phantomjs /bin/phantomjs &&\ | |
54 | rm -fr phantomjs-1.9.8-linux-x86_64 &&\ | |
5d6f9ed2 | 55 | wget http://static.jonof.id.au/dl/kenutils/pngout-20130221-linux.tar.gz &&\ |
e8f79810 | 56 | tar -xf pngout-20130221-linux.tar.gz &&\ |
5d6f9ed2 RH |
57 | rm pngout-20130221-linux.tar.gz &&\ |
58 | cp pngout-20130221-linux/x86_64/pngout /bin/pngout &&\ | |
edcdd0c9 S |
59 | rm -rf pngout-20130221-linux &&\ |
60 | apt-get install -y nodejs &&\ | |
61 | npm install uglify-js -g | |
5d6f9ed2 | 62 | |
edcdd0c9 S |
63 | RUN add-apt-repository ppa:ubuntu-toolchain-r/test &&\ |
64 | apt-get update &&\ | |
65 | apt-get install -y gcc-4.9 &&\ | |
66 | (cd /usr/bin && rm gcc && ln -s gcc-4.9 gcc) &&\ | |
67 | echo 'gem: --no-document' >> /usr/local/etc/gemrc &&\ | |
be82e068 S |
68 | mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\ |
69 | cd /src/ruby-build && ./install.sh &&\ | |
6f85e815 | 70 | cd / && rm -rf /src/ruby-build && ruby-build 2.0.0-p594 /usr/local &&\ |
be82e068 | 71 | gem update --system &&\ |
05a13f9e S |
72 | gem install bundler &&\ |
73 | rm -rf /usr/local/share/ri/2.0.0/system &&\ | |
74 | cd / && git clone https://github.com/SamSaffron/pups.git | |
be82e068 | 75 | |
05a13f9e | 76 | # clean up for docker squash |
074f2b6a | 77 | RUN rm -fr /usr/share/man && rm -fr /usr/share/doc && mkdir -p /etc/runit/3.d |
23022c1d MB |
78 | |
79 | ADD runit-1 /etc/runit/1 | |
80 | ADD runit-1.d-cleanup-pids /etc/runit/1.d/cleanup-pids | |
b8dfc9a7 | 81 | ADD runit-1.d-anacron /etc/runit/1.d/anacron |
23022c1d | 82 | ADD runit-2 /etc/runit/2 |
074f2b6a S |
83 | ADD runit-3 /etc/runit/3 |
84 | ADD boot /sbin/boot | |
be82e068 S |
85 | |
86 | ADD cron /etc/service/cron/run | |
87 | ADD rsyslog /etc/service/rsyslog/run | |
074f2b6a S |
88 | |
89 | # this is temporary, remove in 2015 | |
90 | RUN cp /sbin/boot /sbin/runit |