If you’re running Ubuntu LTS (typically the recommended Distro for Discourse). Each free version edition from my understanding has a 5 year support cycle.
So from my understanding from the list if you’re running 18.04 or 20.04 you should look into upgrading the OS. If 18.04 is definite and with 20.04 support ending in April should consider doing it as well
The other component would be to look into Docker Version compatibility. This part I honestly am not sure of. Though at a guess I think Ubuntu 22.04 LTS might support the latest Docker Discourse requires but would need someone with stronger knowledge to weigh in. However maybe a search on Meta here might also have this info.
