When running Git commands inside this Docker container (i.e., commands
that the `version.py` script needs for determining version information),
the Docker build would run into issues like:
```
fatal: detected dubious ownership in repository at '/workspace'
To add an exception for this directory, call:
git config --global --add safe.directory /workspace
```
This is due to an extra Git check that detects that the Docker user is
not the same one who owns the `.git` directory of this project. After
looking into this, the best solution the internet has to offer is to
thread the current user's UID and GID through the Docker image (i.e.,
the new `builder` user) and then `docker run --user ...`. This both
avoids the Git check but also seems to be considered a best practice in
some circles (?).
It appears newer LLVM releases need a newer version of Python, and
Xenial is quite old at this point, there being two LTS releases newer
it at this time.
Ubuntu is based on debian and debian a more stable base to build on
IMHO. This shouldn't effect much other than some minor changes in the
exact version clang we use to cross compile and the specific linked
host shared libraries.
Also, run `apt-get clean` to minimize image size (not that that really
matters since this is only used during SDK build).