RUN useradd discourse -s /bin/bash -m -U &&\
mkdir /var/www && cd /var/www &&\
git clone --depth 1 https://github.com/discourse/discourse.git &&\
- chown -R discourse:discourse /var/www/discourse && cd / &&\
+ chown -R discourse:discourse /var/www/discourse &&\
cd /var/www/discourse &&\
sudo -u discourse RAILS4=1 bundle install --deployment \
--without test --without development &&\
add-apt-repository -y ppa:nginx/stable &&\
add-apt-repository -y ppa:pitti/postgresql &&\
apt-get -y update &&\
- apt-get install -y build-essential git curl libxml2-dev \
- libxslt-dev libcurl4-openssl-dev \
- libssl-dev libyaml-dev libtool \
- libxslt-dev libxml2-dev gawk curl \
- pngcrush imagemagick \
- postgresql-9.2 postgresql-client-9.2 \
- postgresql-contrib-9.2 libpq-dev libreadline-dev \
- nginx wget language-pack-en sudo cron \
- psmisc &&\
+ apt-get -y install build-essential git curl wget \
+ libxslt-dev libcurl4-openssl-dev \
+ libssl-dev libyaml-dev libtool \
+ libxml2-dev gawk \
+ pngcrush imagemagick \
+ postgresql-9.2 postgresql-client-9.2 \
+ postgresql-contrib-9.2 libpq-dev libreadline-dev \
+ nginx language-pack-en sudo cron \
+ psmisc &&\
dpkg-divert --local --rename --add /sbin/initctl &&\
ln -s /bin/true /sbin/initctl &&\
- apt-get install -y redis-server haproxy openssh-server &&\
+ 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 && cd / &&\
- cd /src/ruby-build &&\
- ./install.sh && cd / &&\
- rm -rf /src/ruby-build &&\
- ruby-build 2.0.0-p353 /usr/local &&\
+ mkdir /src && cd /src && git clone https://github.com/sstephenson/ruby-build.git &&\
+ cd /src/ruby-build && ./install.sh &&\
+ cd / && rm -rf /src/ruby-build && ruby-build 2.0.0-p353 /usr/local &&\
gem update --system &&\
gem install bundler &&\
cd / && git clone https://github.com/SamSaffron/pups.git &&\
wget http://www.canonware.com/download/jemalloc/jemalloc-3.4.1.tar.bz2 &&\
tar -xvjf jemalloc-3.4.1.tar.bz2 && cd jemalloc-3.4.1 && ./configure && make &&\
mv lib/libjemalloc.so.1 /usr/lib && cd / && rm -rf /jemalloc &&\
- apt-get install -y runit monit && apt-get clean && locale-gen en_US
+ apt-get -y install runit monit &&\
+ apt-get clean &&\
+ locale-gen en_US