Skip to content

Commit 0a9fc8d

Browse files
author
Frank Macreery
committed
Update Dockerfile for RubyGems 2.7.0+
As of RubyGems 2.7.0 (released last month), Bundler is now a default (aka "vendored") gem. As a result we need to either accept the default bundler gem or explicitly force our own using `gem install --force`. I'm taking the latter approach because I believe it's less brittle for Docker images that depend on this one. Specifically, once we've installed *one* version of the bundler gem, subsequent `gem install bundler` calls will work without `--force`. So, if a dependent Dockerfile includes a step `RUN gem install bundler`, that should continue to work without error. Also, this is the approach taken by the docker-library/ruby image. See also: rubygems/rubygems#2058 docker-library/ruby#165
1 parent e74107c commit 0a9fc8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ RUN BUILD_DIR="/tmp/ruby-build" \
2121
&& rm -rf /var/lib/apt/lists/*
2222

2323
RUN gem update --system
24-
RUN gem install bundler
24+
RUN gem install --force bundler
2525

2626
ADD test /tmp/test
2727
RUN bats /tmp/test

0 commit comments

Comments
 (0)