The description of the official image has different tags with different Jommla and php versions, it even shows an example for a compose file…
https://hub.docker.com/_/joomla
Furthermore, you might want to read this topic: Container Security & Encryption