Question

Docker Mongodb and Robo3t

Hello everybody, I transfer my question here with the hope someone will be able to help me: https://stackoverflow.com/questions/64591321/connect-a-mongodb-docker-container-running-on-server-to-robo-3t-on-my-computer


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

In order to be able to connect to the MongoDB container from the outside world, you would need to make sure that you’ve exposed the Mongo DB port:

docker run -d --name mongo-container -p 27888:27017 -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret mongo

Alternatively, DigitalOcean now offers Managed MonogDB database clusters:

https://www.digitalocean.com/products/managed-databases-mongodb/

This is a great option in case that you are looking for a hassle-free MongoDB solution.

Regards, Bobby