I am currently running matrix via ansible in a VM
This is a quite clunky solution for something that I just want as a chat app.
There are various containers for matrix but they are all a pain.
What I have seen supported is a lightweight matrix compatible alternative called Conduit - Famedly / Conduit · GitLab
It seems that it can run on quite low end hardware which could be a perfect implementation for the rest of us running in containers.
They also have the docker instructions here - docker/README.md · next · Famedly / Conduit · GitLab