Skip to content

Add 2.5-rc builds #165

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 24, 2017
Merged

Add 2.5-rc builds #165

merged 1 commit into from
Oct 24, 2017

Conversation

mtsmfm
Copy link
Contributor

@mtsmfm mtsmfm commented Oct 21, 2017

Please merge docker-library/official-images#3606 first 🙏
Current test suite is failed because of removing mathn.rb from stdlib since Ruby 2.5


Ruby 2.5.0-preview1 is released.

https://www.ruby-lang.org/en/news/2017/10/10/ruby-2-5-0-preview1-released/

I ran following commands to create them:

cp -r 2.4 2.5-rc
./update.sh

@mtsmfm mtsmfm changed the title Add 2.5-rc builds [Don't merge] Add 2.5-rc builds Oct 22, 2017
@mtsmfm mtsmfm force-pushed the add-2-5-rc branch 2 times, most recently from e6bbef0 to b1453dd Compare October 23, 2017 16:51
@mtsmfm mtsmfm changed the title [Don't merge] Add 2.5-rc builds Add 2.5-rc builds Oct 23, 2017
@mtsmfm
Copy link
Contributor Author

mtsmfm commented Oct 23, 2017

Now CI is passed 💚

@tianon
Copy link
Member

tianon commented Oct 23, 2017

We should ditch jessie and alpine3.4 variants for 2.5+. 👍

Also, I'm not so sure about adding --force to the bundler install -- bundler was not included in previous versions and now is, or it's now at the same version as the latest so fails to install? (We've had lots of issues around this sort of thing with Python and PIP, so my default reaction to these types of problems is now being wary. 😅)

If bundler was not included and is now, I wonder if perhaps for 2.5+ we should stop installing our own version and just let whatever comes with Ruby stay (especially since as written, our final image will end up with two copies of bundler since the reinstall happens in a later layer).

@mtsmfm
Copy link
Contributor Author

mtsmfm commented Oct 23, 2017

Bundler is default gem since Ruby 2.5.

https://www.ruby-lang.org/en/news/2017/10/10/ruby-2-5-0-preview1-released/

I add --force option to avoid following message:

bundler's executable "bundle" conflicts with /usr/local/bin/bundle
Overwrite the executable? [yN]

If bundler was not included and is now, I wonder if perhaps for 2.5+ we should stop installing our own version and just let whatever comes with Ruby stay

I think we should do as same as rubygems.
We already have updated rubygems.

&& gem update --system "$RUBYGEMS_VERSION"

So specifying bundler version and re-installing makes sense to me.

especially since as written, our final image will end up with two copies of bundler since the reinstall happens in a later layer

So then, what do you think about inlining?

...
ENV BUNDLER_VERSION %%BUNDLER%%
...
&& rm -r /usr/src/ruby \
	\
	&& gem update --system "$RUBYGEMS_VERSION" \
        && gem install bundler --version "$BUNDLER_VERSION" --force
...

@tianon
Copy link
Member

tianon commented Oct 23, 2017 via email

@mtsmfm
Copy link
Contributor Author

mtsmfm commented Oct 24, 2017

@tianon Updated!
Could you review again?

@tianon tianon merged commit cf74f88 into docker-library:master Oct 24, 2017
@tianon
Copy link
Member

tianon commented Oct 24, 2017

Thanks!

@mtsmfm mtsmfm deleted the add-2-5-rc branch October 24, 2017 16:56
tianon added a commit to infosiftr/stackbrew that referenced this pull request Oct 24, 2017
- `ghost`: 1.15.1
- `kibana`: 5.6.3 (oops)
- `logstash`: 5.6.3 (oops)
- `mariadb`: resync config fixes (MariaDB/mariadb-docker#133)
- `mysql`: fix config issues (docker-library/mysql#336)
- `percona`: resync config fixes, `MYSQL_ROOT_HOST` (docker-library/percona#51)
- `ruby`: 2.5.0-preview1 (docker-library/ruby#165)
fancyremarker pushed a commit to krallin/docker-ruby that referenced this pull request Dec 15, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants