Update standalone.yml
[discourse_docker.git] / image / base / Dockerfile
CommitLineData
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
5FROM ubuntu:12.04
e1903539
SS
6
7MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
8
0b0d6fcb
MB
9RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\
10 apt-get -y update &&\
e1903539 11 apt-get -y upgrade &&\
b404fee4
S
12 apt-get -y install python-software-properties &&\
13 add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe" &&\
e1903539
SS
14 add-apt-repository -y ppa:rwky/redis &&\
15 add-apt-repository -y ppa:nginx/stable &&\
b404fee4
S
16 apt-get install -y curl && curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - &&\
17 echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | \
18 tee /etc/apt/sources.list.d/postgres.list &&\
e1903539 19 apt-get -y update &&\
d08dd53f
RH
20 apt-get -y install build-essential git curl wget \
21 libxslt-dev libcurl4-openssl-dev \
22 libssl-dev libyaml-dev libtool \
23 libxml2-dev gawk \
24 pngcrush imagemagick \
b404fee4
S
25 postgresql-9.3 postgresql-client-9.3 \
26 postgresql-contrib-9.3 libpq-dev libreadline-dev \
d08dd53f
RH
27 nginx language-pack-en sudo cron \
28 psmisc &&\
e1903539
SS
29 dpkg-divert --local --rename --add /sbin/initctl &&\
30 ln -s /bin/true /sbin/initctl &&\
d08dd53f 31 apt-get -y install redis-server haproxy openssh-server &&\
e1903539 32 echo 'gem: --no-document' >> /etc/gemrc &&\
d08dd53f
RH
33 mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\
34 cd /src/ruby-build && ./install.sh &&\
b404fee4 35 cd / && rm -rf /src/ruby-build && ruby-build 2.0.0-p451 /usr/local &&\
e1903539 36 gem update --system &&\
b234b92a 37 gem install bundler &&\
e1903539
SS
38 cd / && git clone https://github.com/SamSaffron/pups.git &&\
39 mkdir /jemalloc && cd /jemalloc &&\
40 wget http://www.canonware.com/download/jemalloc/jemalloc-3.4.1.tar.bz2 &&\
41 tar -xvjf jemalloc-3.4.1.tar.bz2 && cd jemalloc-3.4.1 && ./configure && make &&\
42 mv lib/libjemalloc.so.1 /usr/lib && cd / && rm -rf /jemalloc &&\
2cc4e49f 43 apt-get -y install runit monit socat &&\
d08dd53f
RH
44 apt-get clean &&\
45 locale-gen en_US