Commit | Line | Data |
---|---|---|
e1903539 SS |
1 | # DOCKER-VERSION 0.6.7 : samsaffron/discourse_base |
2 | ||
b404fee4 S |
3 | # Official repo only has a ppa for postgresql 9.3 at the moment (14/3/2014) |
4 | # When new LTS ships we can upgrade | |
2bdce9f4 MB |
5 | |
6 | # VERSION 0.2.0 | |
b404fee4 | 7 | FROM ubuntu:12.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 &&\ |
2bdce9f4 MB |
12 | apt-get -y install fping &&\ |
13 | sh -c "fping proxy && echo 'Acquire { Retries \"0\"; HTTP { Proxy \"http://proxy:3128\";}; };' > /etc/apt/apt.conf.d/40proxy || true" &&\ | |
0b0d6fcb | 14 | apt-get -y update &&\ |
b404fee4 S |
15 | apt-get -y install python-software-properties &&\ |
16 | add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe" &&\ | |
2bdce9f4 MB |
17 | add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates main universe" &&\ |
18 | apt-get -y update &&\ | |
19 | apt-mark hold initscripts &&\ | |
20 | apt-get -y upgrade &&\ | |
e1903539 SS |
21 | add-apt-repository -y ppa:rwky/redis &&\ |
22 | add-apt-repository -y ppa:nginx/stable &&\ | |
b404fee4 S |
23 | apt-get install -y curl && curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - &&\ |
24 | echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | \ | |
25 | tee /etc/apt/sources.list.d/postgres.list &&\ | |
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 \ | |
d08dd53f | 34 | nginx language-pack-en sudo cron \ |
2bdce9f4 | 35 | psmisc rsyslog &&\ |
e1903539 | 36 | dpkg-divert --local --rename --add /sbin/initctl &&\ |
2bdce9f4 | 37 | sh -c "test -f /sbin/initctl || ln -s /bin/true /sbin/initctl" &&\ |
d08dd53f | 38 | apt-get -y install redis-server haproxy openssh-server &&\ |
e1903539 | 39 | echo 'gem: --no-document' >> /etc/gemrc &&\ |
d08dd53f RH |
40 | mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\ |
41 | cd /src/ruby-build && ./install.sh &&\ | |
b404fee4 | 42 | cd / && rm -rf /src/ruby-build && ruby-build 2.0.0-p451 /usr/local &&\ |
e1903539 | 43 | gem update --system &&\ |
b234b92a | 44 | gem install bundler &&\ |
e1903539 SS |
45 | cd / && git clone https://github.com/SamSaffron/pups.git &&\ |
46 | mkdir /jemalloc && cd /jemalloc &&\ | |
47 | wget http://www.canonware.com/download/jemalloc/jemalloc-3.4.1.tar.bz2 &&\ | |
48 | tar -xvjf jemalloc-3.4.1.tar.bz2 && cd jemalloc-3.4.1 && ./configure && make &&\ | |
49 | mv lib/libjemalloc.so.1 /usr/lib && cd / && rm -rf /jemalloc &&\ | |
2cc4e49f | 50 | apt-get -y install runit monit socat &&\ |
d08dd53f | 51 | apt-get clean &&\ |
2bdce9f4 | 52 | rm -f /etc/apt/apt.conf.d/40proxy &&\ |
d08dd53f | 53 | locale-gen en_US |