You must use Bundler 2 or greater with this lockfile. When running docker-compose up locally
Adding this line before RUN bundle install to the Dockerfile did the trick for me.
RUN gem install bundler -v 2.0.1
Leaving this here for future reference!
You need to update Rubygems:
RUN gem update --system
Apart of being sure that you have the correct bundler version, run:
RUN gem install bundler -v 2.0.1
Here you can find a deeply explanation.
in your Gemfile.lock, at the bottom, you may find bundle version:
BUNDLED WITH
2.0.1
Please make sure you bundled it with the correct version that you have