Use these environment variables in your docker-compose.
environment:
mail__transport: SMTP
mail__options__host:
mail__options__port:
mail__options__auth__user:
mail__options__auth__pass:
mail__from: email@domain.com. <email@domain.com>
I got it working like this.
Perhaps bit late of an answer, but might still help you or someone else out.