OP is using Docker + Make in a similar way to how I was a few years ago, before I started using Toast (<a href="https://github.com/stepchowfun/toast" rel="nofollow">https://github.com/stepchowfun/toast</a>). Toast lets you define tasks like you would with Make (without all the hairy gotchas of Makefiles), but it runs them inside Docker containers for better portability/reproducibility.
I get the arguments for using containers, but why use Docker? Especially if you're already using Make? Building a container image is pretty simple in Make (or bash, or anything else); you just copy a "config.json" into the output directory, tar it up, and write its sha256 to a "manifest.json" file.<p>Update: If you want to include other "layers", e.g. if the Z3 project provides its own image, then just put their SHA256 in the manifest.json too.