I\'m trying to create some kind of script that will create a docker with mongodb and automatically create a user.
I can usually manage my docker images with docker-c
Mongo image provides the /docker-entrypoint-initdb.d/ path to deploy custom .js or .sh setup scripts.
Check this post to get more details : How to create a DB for MongoDB container on start up?