Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

MongoDB Docker Guide

Some basic commands to use MongoDB docker container

✨Prerequisites

Running a sample

docker-compose up

To stop and remove all containers of the sample application run:

docker-compose down

To stop and remove all containers with Volume of the sample application run:

docker-compose down -v

✨ MongoDB Config

  • username - root
  • password - example
  • port - 27017

✨ Mongo-Express Client

Excess the web based mongodb Client on port 8081 to create,view, update and delete the database

🎓 MongoDB Commands

  1. Run the following command to open the mssql client terminal and enter the password (Passw0rd.) when prompted.
docker exec -it mongo_db mongosh --username root --password example
  1. To See list of database:
show dbs;
  1. Create database command
use lks;
  1. Change database context command
use lks;
  1. Create database command
drop database lks;

Author

👤 RajawatBanna