DEV Community

Ruby on Rails containerization example

Ivan Ivashchenko on March 14, 2024

This article describes the process of containerizing a Ruby on Rails application to use in local development process. There are no innovative ideas...
Collapse
 
thorstenhirsch profile image
Thorsten Hirsch

One question, Ivan. Streamlining the development environment with staging and production is reasonable, of course, but it looks more like an approach for VM's instead of containers, especially when considering this point:

Updating gems does not require rebuilding containers.

This means containers (or their images) aren't versioned with the full Ruby environment - instead the environment is being altered when running. I don't think it's that big of a deal since you're using a custom Ruby installation instead of Ubuntu's Ruby packages, so you keep it under your control. But still, I find it a bit weird to handle containers like VM's.

Collapse
 
ivanivashchenko profile image
Ivan Ivashchenko

We just have some number of libraries/scripts which potentially could have a different behavior or so on different platforms, that's why we decided to make our base image with the certain OS version.
In all other respects, this is the pretty standard image, almost the same as Dockerhub Ruby version, but only based on a different OS.