In Rails 7, the image processing was switched from a default of ImageMagick to Vips thanks to PR #42744. Now that Rails has a templated Dockerfile that it generates for new apps, this Dockerfile should be building/installing libvips-dev and other common optional dependencies for working with images using Vips.
I’m not sure if simply dropping an apt-get install
for libvips is enough, though, given how out-of-date the packages in apt
typically are. Actually getting Vips built from source in a production environment can be a bit of a daunting task; there have been numerous issues opened against libvips/ruby-vips about difficulties with getting libvips installed in environments like, e.g., Heroku (especially to get more complicated installations that support things like manipulating HEIC images). Their new build system may help with this, though: Build for Ubuntu · libvips/libvips Wiki · GitHub