I recommend that you get a new vm with a new os and make a backup on the old machine and restore it to the new one. That will save a step of upgrading the database.
Unless you love Centos for a particular reason, I would go with Ubuntu, which most people here use, or Debian, which the discourse docker container is now based on.
We completely understand this, but if switching to Ubuntu were that easy, we would do it.
Do we have the information somewhere about the docker tags and discourse versions to perform an upgrade?
I think you need Docker 28? But maybe 26 would be good enough.
It looks like there is no way to upgrade Centos 7, so you’re going to need to move to a new VM, or if this is your own server, you’ll need to install a new OS to upgrade it. Once you’re installing an OS, it’s not much easier or harder to install any different Linux.
If you don’t want to upgrade your OS, then don’t upgrade Discourse.
I see that there are open source successors to Centos, and AlmaLinux
appears to be a strong contender - CERN chose it, and they know what they are doing. It’s RedHat flavour so your sysadmin skills will transfer.
I’m not confident that you can solve your problem by cherry-picking a Docker. Processes which run within Docker use the same kernel as all others, and I think the kernel version - the actual version, not the patchlevel - will need to be newer than the one you have.
I second the idea that the best approach is to provision a new server with a new OS and restore a Discourse backup.