From: David Taylor Date: Thu, 26 Aug 2021 16:11:01 +0000 (+0100) Subject: FIX: Don't install devDependencies in production image (#564) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=53ef82b53910439f1af0eaef37ffb5371e0e4268;p=discourse_docker.git FIX: Don't install devDependencies in production image (#564) devDependencies includes `lefthook`, which can cause some unexpected side effects during git operations in a production image --- diff --git a/image/base/Dockerfile b/image/base/Dockerfile index a8b4082..09024e5 100644 --- a/image/base/Dockerfile +++ b/image/base/Dockerfile @@ -140,6 +140,6 @@ RUN useradd discourse -s /bin/bash -m -U &&\ chown -R discourse:discourse /var/www/discourse &&\ cd /var/www/discourse &&\ sudo -u discourse bundle install --deployment --jobs 4 --without test development &&\ - sudo -u discourse yarn install &&\ + sudo -u discourse yarn install --production &&\ bundle exec rake maxminddb:get &&\ find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} +