Last active
February 20, 2020 10:49
-
-
Save yuriburger/711435b51bf61fbd78734f84177a20a0 to your computer and use it in GitHub Desktop.
[run mongo] Run MongoDB in a Docker container #mongo #docker
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
sudo docker run -d --name my-mongo -p 27017:27017 -v ~/data:/data/db \ | |
-e MONGO_INITDB_ROOT_USERNAME=<myuser> \ | |
-e MONGO_INITDB_ROOT_PASSWORD=<mysecret> \ | |
mongo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment