Docker and Container making my life great. these days I can explore every thing using this.
I have installed MongoDB quick on my Docker using
Docker pull Mongo
docker run –name MyMongo –restart=always -d -p 27017:27017 mongo
this is install MongoDB container on docker.
That’s it!!!. great.
to go to Mongo shell.
to see its created
Docker ps -a
start mongoDB as
Docker start MyMongo
to see its started
to stop the Container
Docker stop MyMongo
To remove /permanently
Docker rm MyMongo
MongoDb is like java programming, it is a developers database.
After start of docker execute (exec) of MyMongo MongoDB interactive (-it) shell(bash)
Docker exec -it MyMongo bash
no you will be on MyMongo container start Mongo Shell
you are now on MongoDB shell to write mongoDB commands (next blog.:).
*Docker is CASE Sensitive