How to connect to a MongoDb of a docker container
I've created the following docker-compose.yml: version: "3" services: mongo: image: mongo:latest environment: MONGO_INITDB_ROOT_USERNAME: admin MONGO_INITDB_ROOT_PASSWORD: admin ports: - '27017:27017' I then start my containers: docker-compose up then I try to connect into MongoDb Compass(also tried through c# code), with the…