Docker actually works alright for compiling, and pretty mature on all platforms (Linux, macOS, Windows) at this point.
That'll be easier if all components are open-sourced, randomly removing binaries you are basically praying that one of the closed-sourced components is not expecting it (and...