Discourse 3.4 is looking for Docker 24.0.7 min
It looks like from Google search that Ubuntu 22.04 LTS supports it.
It is of course also supported in latest Ubuntu 24 LTS… It looks like it is also supported on Ubuntu 20.04 LTS but imho one should consider upgrading as this LTS support is ending in April 2025; however in theory should be safe, if you need more time before upgrading the OS
Do you know what version your OS is? I am presuming you are running an Ubuntu LTS.