Skip to content
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

Add extra pieces to finish Ruby 3.3.0 addition #382

Merged
merged 1 commit into from
Dec 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## not released
* Added a Ruby 3.3.0 image
* Upgraded to JRuby 9.3.13.0 (from 9.3.11.0)
* Upgraded to JRuby 9.4.5.0 (from 9.4.3.0)

## 2.6.0 (release date: 2023-11-20)
* Upgraded to Phusion Passenger 6.0.19 (from 6.0.18).
* Switched image base to phusion/baseimage:jammy-1.0.1
Expand Down
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Basics (learn more at [baseimage-docker](http://phusion.github.io/baseimage-dock

Language support:

* Ruby 3.0.6, 3.1.4, 3.2.2 and JRuby 9.3.11.0 and 9.4.3.0.
* Ruby 3.0.6, 3.1.4, 3.2.2, 3.3.0 and JRuby 9.3.11.0 and 9.4.3.0.
* RVM is used to manage Ruby versions. [Why RVM?](#why_rvm)
* 3.2.2 is configured as the default.
* JRuby is installed from source, but we register an APT entry for it.
Expand Down Expand Up @@ -132,6 +132,7 @@ Passenger-docker consists of several images, each one tailor made for a specific
* `phusion/passenger-ruby30` - Ruby 3.0.
* `phusion/passenger-ruby31` - Ruby 3.1.
* `phusion/passenger-ruby32` - Ruby 3.2.
* `phusion/passenger-ruby33` - Ruby 3.3.
* `phusion/passenger-jruby93` - JRuby 9.3.
* `phusion/passenger-jruby94` - JRuby 9.4.

Expand Down Expand Up @@ -202,6 +203,7 @@ CMD ["/sbin/my_init"]
#RUN /pd_build/ruby-3.0.*.sh
#RUN /pd_build/ruby-3.1.*.sh
#RUN /pd_build/ruby-3.2.*.sh
#RUN /pd_build/ruby-3.3.*.sh
#RUN /pd_build/jruby-9.3.*.sh
#RUN /pd_build/jruby-9.4.*.sh
#
Expand Down Expand Up @@ -258,6 +260,8 @@ server {
passenger_user app;

# If this is a Ruby app, specify a Ruby version:
# For Ruby 3.3
passenger_ruby /usr/bin/ruby3.3;
# For Ruby 3.2
passenger_ruby /usr/bin/ruby3.2;
# For Ruby 3.1
Expand Down Expand Up @@ -440,10 +444,12 @@ RUN bash -lc 'rvm --default use ruby-3.0.6'
RUN bash -lc 'rvm --default use ruby-3.1.4'
# Ruby 3.2.2
RUN bash -lc 'rvm --default use ruby-3.2.2'
# JRuby 9.3.11.0
RUN bash -lc 'rvm --default use jruby-9.3.11.0'
# JRuby 9.4.3.0
RUN bash -lc 'rvm --default use jruby-9.4.3.0'
# Ruby 3.3.0
RUN bash -lc 'rvm --default use ruby-3.3.0'
# JRuby 9.3.13.0
RUN bash -lc 'rvm --default use jruby-9.3.13.0'
# JRuby 9.4.5.0
RUN bash -lc 'rvm --default use jruby-9.4.5.0'
```

Learn more: [RVM: Setting the default Ruby](https://rvm.io/rubies/default).
Expand Down
4 changes: 4 additions & 0 deletions image/nginx-passenger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ run sed -i 's|invoke-rc.d nginx rotate|sv 1 nginx|' /etc/logrotate.d/nginx
run sed -i -e '/sv 1 nginx.*/a\' -e ' passenger-config reopen-logs >/dev/null 2>&1' /etc/logrotate.d/nginx

## Precompile Ruby extensions.
if [[ -e /usr/bin/ruby3.3 ]]; then
run ruby3.3 -S passenger-config build-native-support
run setuser app ruby3.3 -S passenger-config build-native-support
fi
if [[ -e /usr/bin/ruby3.2 ]]; then
run ruby3.2 -S passenger-config build-native-support
run setuser app ruby3.2 -S passenger-config build-native-support
Expand Down
2 changes: 2 additions & 0 deletions image/ruby_support/finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function set_rvm_default()
known_rubies=`/usr/local/rvm/bin/rvm list strings`
if [[ "$known_rubies" =~ ruby-3\.2 ]]; then
set_rvm_default ruby-3\.2
elif [[ "$known_rubies" =~ ruby-3\.3 ]]; then
set_rvm_default ruby-3\.3
elif [[ "$known_rubies" =~ ruby-3\.1 ]]; then
set_rvm_default ruby-3\.1
elif [[ "$known_rubies" =~ ruby-3\.0 ]]; then
Expand Down