You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'm facing a problem with setting up authentication for mongo. It seems like windows-based docker images ignore MONGO_INITDB_ROOT_USERNAME, MONGO_INITDB_ROOT_PASSWORD environment variables and don't create admin database. When I add keyfile to my containers startup, it enforces authentication (expected behavior), as the result I'm able to connect to container with mongo shell, but can't authenticate using credentials passed via environment variables.
After inspecting images sources I've found out that this initialization seems to happen in docker-entrypoint.sh, which are not entrypoint for windows-based images.
For linux image:
Hello, I'm facing a problem with setting up authentication for mongo. It seems like windows-based docker images ignore MONGO_INITDB_ROOT_USERNAME, MONGO_INITDB_ROOT_PASSWORD environment variables and don't create admin database. When I add keyfile to my containers startup, it enforces authentication (expected behavior), as the result I'm able to connect to container with mongo shell, but can't authenticate using credentials passed via environment variables.
After inspecting images sources I've found out that this initialization seems to happen in docker-entrypoint.sh, which are not entrypoint for windows-based images.
For linux image:
For windows image:
EXPOSE 27017 CMD ["mongod", "--bind_ip_all"]
Do windows-based images support MONGO_INITDB_ROOT_USERNAME and js initscripts in /docker-entrypoint-initdb.d/ ?
P.S. everything works fine when I just switch to linux containers (with the same compose file)
The text was updated successfully, but these errors were encountered: