We are getting issue with docker to connect with MongoDb

IN local Db connection is working perfectly but in docker error (Error in DB connection MongoParse Error : URI malformed, cannot be parsed) in the DB connection

Hi @Nidhi_Savaliya and welcome to MongoDB community forum!!

It would be helpful to understand the issue further if you could help with the following details:

  1. The connection URI you are using for connecting to MongoDB
  2. The docker-compose.yaml file
  3. The MongoDB version you are using
  4. A more detailed error logs would be more helpful in understanding better.

As a general tip, if you are trying to connect to the localhost, please make sure if the localhost name has the host.docker.internal in the /etc/hosts file for the linux system

Best Regards