Skip to content

Instantly share code, notes, and snippets.

@justingosan
Created January 29, 2018 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justingosan/d0fb54590cb7e8bfd7c87a58dee0ae66 to your computer and use it in GitHub Desktop.
Save justingosan/d0fb54590cb7e8bfd7c87a58dee0ae66 to your computer and use it in GitHub Desktop.
Quick docker mongodb
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