Skip to content

Instantly share code, notes, and snippets.

@CornejoReyes
Created December 15, 2020 03:11
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save CornejoReyes/515c289c04e5bd6c177147eb9e34695c to your computer and use it in GitHub Desktop.
MongoDB on Docker container
docker run -d --name mongo -p 27017:27017 -e MONGO_INITDB_ROOT_USERNAME=<username> -e MONGO_INITDB_ROOT_PASSWORD=<password> -v /my/own/dir:/data/db mongo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment