When you're running multiple projects expecting the same globally installed library or shell command (but a different version), building/running in docker is a breeze: each container can have its own set of dependency versions.
There's your problem! Different versions of anything can coexist if they're installed to separate locations; e.g. Nix does this by using the `--prefix` option of each project's './configure' script.
AFAIK you can't run Windows binaries using Docker, even if you're using Windows, since it's running in a Linux VM; likewise for macOS binaries on macOS, Solaris on Solaris, etc.