Install MongoDB on Docker Windows 10 [MongoDB Compass] 2020








Requeriments:
docker decktop in windows 10
Optional:
MongoDB Compass


The first step is open powershell and pull the image of MongoDB
docker pull mongo

 And create a container with the image

docker run -d -p 27017-27019:27017-27019 --name mongodb mongo


when the container is running goto the docker dashboard and run the coomand line (CLI) of the mongodb docker container

and run the next command:

mongo


into the mongo shell run the next commands:


use admin;
db.createUser({user: "root", pwd: "password", roles:[{role: "readWrite" , db:"myDatabase"}]});


to connect trougth mongodb compass use the next url:



mongodb://root:password@localhost:27017/myDatabase


Lets play with mongodb and the world of dockerize projects 😋😋




Comentarios

Entradas más populares de este blog

Pickit 2 clone

Como hacer servidor de minecraft sin hamachi