From 53ef82b53910439f1af0eaef37ffb5371e0e4268 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 26 Aug 2021 17:11:01 +0100 Subject: [PATCH] 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 --- image/base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {} + -- 2.25.1