# Official repo only has a ppa for postgresql 9.3 at the moment (14/3/2014)
# When new LTS ships we can upgrade
+
+# VERSION 0.2.0
FROM ubuntu:12.04
MAINTAINER Sam Saffron "https://twitter.com/samsaffron"
RUN echo "debconf debconf/frontend select Teletype" | debconf-set-selections &&\
+ apt-get -y install fping &&\
+ sh -c "fping proxy && echo 'Acquire { Retries \"0\"; HTTP { Proxy \"http://proxy:3128\";}; };' > /etc/apt/apt.conf.d/40proxy || true" &&\
apt-get -y update &&\
- apt-get -y upgrade &&\
apt-get -y install python-software-properties &&\
add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe" &&\
+ add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc)-updates main universe" &&\
+ apt-get -y update &&\
+ apt-mark hold initscripts &&\
+ apt-get -y upgrade &&\
add-apt-repository -y ppa:rwky/redis &&\
add-apt-repository -y ppa:nginx/stable &&\
apt-get install -y curl && curl http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - &&\
postgresql-9.3 postgresql-client-9.3 \
postgresql-contrib-9.3 libpq-dev libreadline-dev \
nginx language-pack-en sudo cron \
- psmisc &&\
+ psmisc rsyslog &&\
dpkg-divert --local --rename --add /sbin/initctl &&\
- ln -s /bin/true /sbin/initctl &&\
+ sh -c "test -f /sbin/initctl || ln -s /bin/true /sbin/initctl" &&\
apt-get -y install redis-server haproxy openssh-server &&\
echo 'gem: --no-document' >> /etc/gemrc &&\
mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\
mv lib/libjemalloc.so.1 /usr/lib && cd / && rm -rf /jemalloc &&\
apt-get -y install runit monit socat &&\
apt-get clean &&\
+ rm -f /etc/apt/apt.conf.d/40proxy &&\
locale-gen en_US