Gitea Mailer with Docker

Is it possible to configure gitea mailer through docker-compose.yml or docker environment?

Yes, if you integrate https://github.com/go-gitea/gitea/tree/master/contrib/environment-to-ini into your docker workflow.