I am encountering the following issue with bundler 1.17.3 and 2.1.4 when executing in a ruby:2.5.8 docker container on Ubuntu 18 with kernel 4.15.0-101-generic. The same project does not exhibit the error on an equivalent container built and run on CentOS 7 with kernel 3.10.0-1127.el7.x86_64.
ArgumentError: could not find a temporary directory
/usr/local/lib/ruby/2.5.0/tmpdir.rb:35:in `tmpdir'
/usr/local/lib/ruby/2.5.0/tmpdir.rb:112:in `tmpdir'
/usr/local/lib/ruby/2.5.0/tmpdir.rb:120:in `create'
/usr/local/lib/ruby/2.5.0/tmpdir.rb:87:in `mktmpdir'
/usr/local/bundle/gems/bundler-2.1.4/lib/bundler/compact_index_client/updater.rb:31:in `update'