I was able to connect to a container from the host machine using the following string:
mongodb://127.0.0.1:27017/?authSource=admin&readPreference=primaryPreferred&retryWrites=false&directConnection=true
the directConnection=true is what helped me. Hope this helps you.