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.
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.)