FIX: Don't run yarn install as root
authorRafael dos Santos Silva <xfalcox@gmail.com>
Mon, 23 Aug 2021 14:31:46 +0000 (11:31 -0300)
committerRafael dos Santos Silva <xfalcox@gmail.com>
Mon, 23 Aug 2021 15:21:03 +0000 (12:21 -0300)
image/base/Dockerfile

index e89e61ba5ab30dc14cee0d159b5ac2001f08a0de..a8b4082b3b141a869885a363e2a1505c734c4848 100644 (file)
@@ -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 &&\
-    yarn install &&\
+    sudo -u discourse yarn install &&\
     bundle exec rake maxminddb:get &&\
     find /var/www/discourse/vendor/bundle -name tmp -type d -exec rm -rf {} +