79755466

Date: 2025-09-04 08:47:16
Score: 2
Natty:
Report link

For me,

This worked

docker run --name <container_name> -p 27018:27017 <mongodb_image>

Assuming port 27018 is not running any process

When it runs, in MongoDB Compass in

Add New Connection: mongodb://localhost:27018 -> Mention the first port number you used for docker run command

Reasons:
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Gaurang