From: David Taylor Date: Mon, 13 Dec 2021 11:56:57 +0000 (+0000) Subject: discourse_test: re-use bundled gems from the base file (#587) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ab881fd3169ef7026bf3772a3a3671d95dc7c80b;p=discourse_docker.git discourse_test: re-use bundled gems from the base file (#587) By doing `rm -rf .bundle` and `bundle install --standalone`, we were setting up bundle to install gems in `./bundle`. The base file installs gems in `./vendor/bundle`. That means that the test image was ending up with two complete copies of our dependencies. This commit removes the `--standalone` command, and allows the `./vendor/bundle` artifacts to be re-used in the test image. --- diff --git a/image/discourse_test/Dockerfile b/image/discourse_test/Dockerfile index 362fe90..f1eceac 100644 --- a/image/discourse_test/Dockerfile +++ b/image/discourse_test/Dockerfile @@ -13,9 +13,10 @@ RUN sudo -E -u discourse -H git config --global user.email "you@example.com" &&\ RUN gem update bundler --force &&\ cd /var/www/discourse &&\ chown -R discourse . &&\ - rm -fr .bundle &&\ + bundle config unset deployment &&\ + bundle config unset without &&\ sudo -u discourse git pull &&\ - sudo -u discourse bundle install --standalone --jobs=4 + sudo -u discourse bundle install --jobs=4 RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - &&\ echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list &&\