Last active
August 3, 2018 14:56
-
-
Save spdeepak/b0be494794abdcaf761cee88494303db to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#1. Start MongoDB container | |
docker run -p 27017:27017 --name macmongo -e MONGO_INITDB_ROOT_PASSWORD=root -e MONGO_INITDB_ROOT_USERNAME=root -e MONGO_INITDB_DATABASE=testdatabase -d mongo:latest | |
#2. Open MongoDB shell | |
docker exec -it macmongo mongo --authenticationDatabase admin -u root -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment