[DOCKER] all-ruby is now available in ghcr.io/ruby/all-ruby

There is something called all-ruby that is useful for comparing the behavior of all versions of ruby. It is said that the image can now be pulled not only from docker hub but also from ghcr.io.

Execution example with an image from docker hub

Previously, the docker hub rubylang/all-ruby was used as the docker image, and it was used as follows. (The content of the execution example is a library that does not require require.)

$ docker run -it --rm rubylang/all-ruby env ALL_RUBY_SINCE=ruby-2.0 ./all-ruby -e 'p $".reject{|s|s.include?("/")}'
ruby-2.0.0-p0       ["enumerator.so"]
...
ruby-2.0.0-p648     ["enumerator.so"]
ruby-2.1.0-preview1 ["enumerator.so", "thread.rb"]
...
ruby-2.1.10         ["enumerator.so", "thread.rb"]
ruby-2.2.0-preview1 ["enumerator.so", "rational.so", "complex.so", "thread.rb"]
...
ruby-2.2.10         ["enumerator.so", "rational.so", "complex.so", "thread.rb"]
ruby-2.3.0-preview1 ["enumerator.so", "thread.rb", "rational.so", "complex.so"]
...
ruby-2.7.0-preview2 ["enumerator.so", "thread.rb", "rational.so", "complex.so"]
ruby-2.7.0-preview3 ["enumerator.so", "thread.rb", "rational.so", "complex.so", "ruby2_keywords.rb"]
...
ruby-3.0.0-preview1 ["enumerator.so", "thread.rb", "rational.so", "complex.so", "ruby2_keywords.rb"]

Execution example with image from ghcr.io

From this year, due to the stricter restrictions on docker hub, GitHub Container Registry (ghcr.io) will also be docker push, and ghcr.io/ruby/all-ruby You can now use it.

The above execution example was docker pull before the release of 3.0.0-preview1, so it is up to preview1, but the following execution example is the output when it is executed for the first time with 3.0.0-preview2 or later. is.

$ docker run -it --rm ghcr.io/ruby/all-ruby env ALL_RUBY_SINCE=ruby-2.0 ./all-ruby -e 'p $".reject{|s|s.include?("/")}'
Unable to find image 'ghcr.io/ruby/all-ruby:latest' locally
latest: Pulling from ruby/all-ruby
852e50cd189d: Pull complete
3d2287ec382d: Pull complete
8532674f7cc9: Pull complete
c2b6a97405ca: Pull complete
Digest: sha256:8c48ad2185525c7a8b5c19fe31f286971b64b7dd41a06be7bee0bd6ba8646943
Status: Downloaded newer image for ghcr.io/ruby/all-ruby:latest
ruby-2.0.0-p0       ["enumerator.so"]
...
ruby-2.0.0-p648     ["enumerator.so"]
ruby-2.1.0-preview1 ["enumerator.so", "thread.rb"]
...
ruby-2.1.10         ["enumerator.so", "thread.rb"]
ruby-2.2.0-preview1 ["enumerator.so", "rational.so", "complex.so", "thread.rb"]
...
ruby-2.2.10         ["enumerator.so", "rational.so", "complex.so", "thread.rb"]
ruby-2.3.0-preview1 ["enumerator.so", "thread.rb", "rational.so", "complex.so"]
...
ruby-2.7.0-preview2 ["enumerator.so", "thread.rb", "rational.so", "complex.so"]
ruby-2.7.0-preview3 ["enumerator.so", "thread.rb", "rational.so", "complex.so", "ruby2_keywords.rb"]
...
ruby-3.0.0-preview2 ["enumerator.so", "thread.rb", "rational.so", "complex.so", "ruby2_keywords.rb"]

Summary

Docker hub has also tightened the restrictions on docker pull, so it's useful to know that you can now also docker pull from ghcr.io.

Digression

As an aside, it seems that https://hub.docker.com/r/rubylang/ruby will also be available at ghcr.io/ruby/ruby. Please wait for the official announcement to actually use this.

Blog introduction

The same article is reprinted for Personal Blog.

Recommended Posts

all-ruby is now available in ghcr.io/ruby/all-ruby
Make html available in Vapor
WebSocket is now disconnected in 60 seconds after HTTPS conversion on AWS