Last active
April 4, 2020 09:05
-
-
Save httpJunkie/cd20a8d36ce89f3b6d1cf7a0c0bb8212 to your computer and use it in GitHub Desktop.
Revisions
-
httpJunkie revised this gist
Apr 4, 2020 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -16,5 +16,16 @@ latest version as of this writing is 4.2.5 which we would name `mongo425` like s ## Connecting to Mongo Shell `docker exec -it mongo425 bash` then run: ``` > mongo > show dbs > use task-management ``` This will first show us the current databases and then we create a new database called task-management -
httpJunkie revised this gist
Apr 4, 2020 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -12,4 +12,9 @@ docker pull mongo:X.X.X latest version as of this writing is 4.2.5 which we would name `mongo425` like so: `docker run -d -p 27017-27019:27017-27019 --name mongo425 mongo:4.2.5` ## Connecting to Mongo Shell `docker exec -it mongodb bash` -
httpJunkie created this gist
Apr 4, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ # Run Mongo using Docker This guide will get you up and running with Mongo ## Download latest Image docker pull mongo:X.X.X ## Installing and Running Mongo in Detached Mode (In Background and able to connect from server) `docker run -d -p 27017-27019:27017-27019 --name mongoXXX mongo:X.X.X` latest version as of this writing is 4.2.5 which we would name `mongo425` like so: `docker run -d -p 27017-27019:27017-27019 --name mongo425 mongo:4.2.5`