phusion / passenger-docker

Docker base images for Ruby, Python, Node.js and Meteor web apps
MIT License
2.77k stars 406 forks source link

Error while trying to use Ruby 3.3 #390

Closed eclectic-coding closed 7 months ago

eclectic-coding commented 7 months ago

The latest version does not set for ruby-3.3.0. Setting with rvm the default version always fails. See below a simple sample configuration and the results:

docker-compose.yml

version: "3.4"
services:
  ruby:
    build:
      context: .
      dockerfile: Dockerfile.passenger
    ports:
      - "80:80"
      - "443:443"
      - "3000:3000"

Dockerfile:

FROM phusion/passenger-full:3.0.0

# Run this to install ruby version in phusion/passenger-full version
RUN bash -lc "rvm --default use ruby-3.3.0"

Error messages:

> [ruby 2/2] RUN bash -lc "rvm --default use ruby-3.3.0":
0.241 To install do: 'rvm install "ruby-3.3.0"'
0.241 Required ruby-3.3.0 is not installed.
------
failed to solve: process "/bin/sh -c bash -lc \"rvm --default use ruby-3.3.0\"" did not complete successfully: exit code: 1

If I change the rvm default command to a different version, other that 3.2.3, which works because it is the default anyway, the command will fails with ruby not installed.

I have tested using passenger-ruby33 and this container will work, but passenger-full:3.0.0 or higher seems broken

CamJN commented 7 months ago

Should be fixed by 8591572bfba6c2838e4eb2729d7fc1118ee3c421

eclectic-coding commented 7 months ago

Thanks for the fast turn around. I will test as soon as the version bump is complete

CamJN commented 7 months ago

The new version has been pushed. and now that the problem is fixed, it takes a whopping 3.75 hours to build the passenger-full images.

eclectic-coding commented 7 months ago

Thank you for pushing out this fix quickly. I have tested with the small setup shown in my intro message and I can confirm Ruby 3.3 works fine now.