From: Rafael dos Santos Silva Date: Tue, 18 Oct 2016 19:11:35 +0000 (-0200) Subject: Move user creation from base to discourse and dev X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=4ca4c1613a0cceeb4f4254e30c6f704fcf2c278f;p=discourse_docker.git Move user creation from base to discourse and dev --- diff --git a/image/base/Dockerfile b/image/base/Dockerfile index c3ccbbe..7429610 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -120,8 +120,3 @@ ADD boot /sbin/boot ADD cron /etc/service/cron/run ADD rsyslog /etc/service/rsyslog/run ADD cron.d_anacron /etc/cron.d/anacron - -# Create discourse user and /var/www location for both -# discourse and dev images. -RUN useradd discourse -s /bin/bash -m -U &&\ - mkdir -p /var/www diff --git a/image/discourse/Dockerfile b/image/discourse/Dockerfile index c1137fd..d3e5301 100644 --- a/image/discourse/Dockerfile +++ b/image/discourse/Dockerfile @@ -5,12 +5,14 @@ FROM discourse/base:1.3.7 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" # Discourse specific bits -RUN cd /var/www &&\ - git clone https://github.com/discourse/discourse.git &&\ - cd discourse &&\ - git remote set-branches --add origin tests-passed &&\ +RUN useradd discourse -s /bin/bash -m -U &&\ + mkdir -p /var/www &&\ + cd /var/www &&\ + git clone https://github.com/discourse/discourse.git &&\ + cd discourse &&\ + git remote set-branches --add origin tests-passed &&\ chown -R discourse:discourse /var/www/discourse &&\ cd /var/www/discourse &&\ - sudo -u discourse bundle install --deployment \ + sudo -u discourse bundle install --deployment \ --without test --without development &&\ find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} + diff --git a/image/discourse_dev/Dockerfile b/image/discourse_dev/Dockerfile index fe1ecb7..5114606 100644 --- a/image/discourse_dev/Dockerfile +++ b/image/discourse_dev/Dockerfile @@ -4,6 +4,11 @@ FROM discourse/base:1.3.7 MAINTAINER Sam Saffron "https://twitter.com/samsaffron" +# Create discourse user and /var/www location for both +# discourse and dev images. +RUN useradd discourse -s /bin/bash -m -U &&\ + mkdir -p /var/www + # Give discourse user no-passwd sudo permissions (for bundle install) ADD sudoers.discourse /etc/sudoers.d/discourse