Make dockerfiles DRY and modular
- Bring in individual snippet files for build instructions of common components.
- Bring in Ruby and ERB templating to reuse things, and select things dynamically depending on OS and platform.
- Bring in a VERSIONS file as SSOT of various component versions.
- Possible duplication of files for platforms is a known issue, because components are inconsistent in usage of platform component in their tarball file names (amd64 vs x86 for example). This is why cmake_armv61 and cmake_arm64 is exactly the same thing.
- Snippets being too small, even if it is a single line, is ok, because it is better than repeating that same line 15 times.
Note to reviewers
There are renames happening, which is making
git diff crazy, and you too if you use the diff tab. Instead, try reviewing it commit by commit, as I have tried to keep them atomic and logically separated.