Created
January 29, 2018 17:58
-
-
Save justingosan/d0fb54590cb7e8bfd7c87a58dee0ae66 to your computer and use it in GitHub Desktop.
Quick docker mongodb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --name mongodb -p 0.0.0.0:27017:27017 -v /data/mongo:/data/db -d mongo --auth | |
docker exec -it some-mongo mongo admin | |
db.createUser({ user: 'admin', pwd: 'mongo123$', roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment