Question

Docker Mongodb and Robo3t

Posted October 29, 2020 1.7k views
MongoDBDocker

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

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.

×
Submit an Answer
1 answer

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