For anyone else also getting socket time out, I believe this is because of what @KeithJackson mentioned as per his post here:
Cosmos DB Docker Container Just Hangs when CosmosClient methods are called
I deleted my old Docker image that I got from Microsoft's example and used the docker command he wrote up and so far, I am no longer seeing a socket time out issue.