MongoDB Docker Container Exercise

You can up and run MongoDB Docker container in your local machine and later connect from mysql CLI to query your collections.

Run the following command in your terminal to up and run a MongoDB NoSQL Docker container.

docker run -p 27017:27017 --name mongoDbTest -d mongo:latest

Run the below code in the terminal to connect to running container.

docker exec -it mongoDbTest bash

Run the below code in the terminal after connecting to container.

mongo

Follow the following link for more details

https://hub.docker.com/_/mongo

Leave a Reply