-
Notifications
You must be signed in to change notification settings - Fork 10
Running and using Mongo locally
kaitoo1 edited this page Jul 24, 2021
·
1 revision
Some useful info for running and using Mongo locally
Default command:
docker run -p 27017:27017 mongo:4.4.6
(optional) You can also name the container in the above command so that's its easier to easier to start/stop the container and run the Mongo DB shell.
docker run -p 27017:27017 --name mongoContainer mongo:4.4.6
If you name your container, the next you want to start it you can just use:
docker start mongoContainer
Assuming you named the container mongoContainer
:
docker exec -it mongoContainer mongo