Doesn't docker seem overkill compared to just a package for a package manager or statically compiling Z3 into your binary?
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.