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

Subscribe
Share

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

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.

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