Mongo: admin user and password from files vs environment vars

Created on 12 Jun 2020  路  2Comments  路  Source: docker-library/mongo

I see that you use the environment vars (below) to set the root user at startup. Is it possible to load those using a file?

MONGO_INITDB_ROOT_USERNAME
MONGO_INITDB_ROOT_PASSWORD

This would allow docker swarm users to pass these variables via docker secrets.

https://docs.docker.com/engine/reference/commandline/secret_create/

question

Most helpful comment

All 2 comments

thanks, I dont know how I missed that

Was this page helpful?
0 / 5 - 0 ratings