Rebuild failure: "extconf failed, exit code 1" -- due to old Docker?

I tried a fix from a different forum. In the launcher script, I replaced:

image="discourse/base:2.0.20231218-0429"

with:

image="discourse/base:2.0.20231230-0022"

This pulls a newer image that contains rbtrace-0.5.1, which makes it work.

Got it from here: Discourse Build Error: "An error occurred while installing rbtrace (0.5.1), and Bundler cannot continue." - #50 by Neo - Discourse System Administration - Unix Linux Community.

I’m running on Oracle Linux 7.7 - old, but comparable to Ubuntu 18.04, I guess.

It would be really interesting to understand why upgrading the OS would also work, though. I always thought that Docker containers are somehow isolated from the OS, especially in this case, when it comes to Ruby gems. (I’m neither a Docker nor a Ruby expert.)