Site icon 峰哥分享

Use docker mongo container to connect to remote mongo db

If you would like to use mongo shell to connect to your mongodb but you don’t bother to install mongo client. You can use following command if you have docker installed.

 docker run -it mongo mongo mongodb_addr .mlab.com:36577/mongo -u username -p password

Exit mobile version