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.
It's a rather convoluted one though: rather than telling libraries to install in different places, they're installed "globally" within a chroot, which then gets tarred-up, which then gets untarred, then bind-mounted, then chrooted-into again.
It's not "cross-platform" at all, since Docker builds on Linux containers. For example, the Docker applications for Windows and macOS just run a Linux VM behind the scenes.
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.