From 7ba8d4e926055d0b88b789801f1836d118e309ef Mon Sep 17 00:00:00 2001
From: David Taylor <david@taylorhq.com>
Date: Wed, 26 Jan 2022 10:18:49 +0000
Subject: [PATCH] FIX: Use `bundle config` instead of deprecated flags (#598)

Bundler 2.3.0 started re-installing and re-invoking itself based on the `BUNDLED WITH` declaration in the Gemfile.lock. The second run of bundler doesn't receive the flags from the initial invocation.

These flags were deprecated some time ago. The recommended solution is to use `bundle config`, which persists the config to the filesystem for future invocations to load.
---
 image/base/release.Dockerfile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/image/base/release.Dockerfile b/image/base/release.Dockerfile
index 49ec625..dd4c3a5 100644
--- a/image/base/release.Dockerfile
+++ b/image/base/release.Dockerfile
@@ -4,7 +4,10 @@ ARG tag=build_slim
 FROM $from:$tag
 
 RUN cd /var/www/discourse &&\
-    sudo -u discourse bundle install --deployment --jobs 4 --without test development &&\
+    sudo -u discourse bundle config --local deployment true &&\
+    sudo -u discourse bundle config --local path ./vendor/bundle &&\
+    sudo -u discourse bundle config --local without test development &&\
+    sudo -u discourse bundle install --jobs 4 &&\
     sudo -u discourse yarn install --production &&\
     sudo -u discourse yarn cache clean &&\
     bundle exec rake maxminddb:get &&\
-- 
2.25.1