The latest version of Docker for Desktop on Windows has improved the pinging support massively.
You can now ping a container directly, which means on this project there is no need for differentiating between Windows and Linux for the MongoDB address.