From: RĂ©gis Hanol Date: Sun, 15 Dec 2013 18:27:55 +0000 (+0100) Subject: Dockerfile cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=d08dd53f37a13a5ed684e339ab6593890ea6c122;p=discourse_docker.git Dockerfile cleanup - removed useless `cd /` - removed duplicate packages --- diff --git a/image/Dockerfile b/image/Dockerfile index 775882d..39fdaf7 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -9,7 +9,7 @@ MAINTAINER Sam Saffron "https://twitter.com/samsaffron" 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 &&\ diff --git a/image/base/Dockerfile b/image/base/Dockerfile index bd493fd..3c459dc 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -12,25 +12,22 @@ RUN apt-get -y update &&\ 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 &&\ @@ -38,4 +35,6 @@ RUN apt-get -y update &&\ 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