You don't define a ruby version in your Dockerfile (i.e. FROM ruby:3.4.1-slim
so you've probably pulled 3.4.1 which has removed some default gems.
See https://stdgems.org/new-in/3.4/
I think you'll need to add these to your Gemfile, run bundle install
then redo your docker build