Welcome to the community support forums !!
Yes, this is possible as Grafana do provide API to create users. Please check our API documentation via this link
Also, there is an ansible module to do such automation. You can check this official link
Other than that, I dug a bit more and found a v.similar post on our community forums (not found a match for docker but v.close to it was Kubernetes) e.g.
- Create a user using api
- kubernetes helm - How can I import users and teams to grafana? - Stack Overflow (with k8s and even with Terraform).
I hope this helps.