So, I am running my mongod replica set instances on docker with ssl/tsl security enabled. Everything is working fine when connect from same host where the docker is running.