Dockerfile: fix linking newuidmap and newgidmap (partially reverts #1405)
Dockerfile: fix linking newuidmap and newgidmap (partially reverts #1405)

* Existing releases v0.3.0...v0.7.1 use newuidmap dynamically linked with musl

* #1405 attempted to link newuidmap statically with glibc, but it was actually dynamically linked by accident and was never used as the external base.
Switching from musl (Alpine) to glibc (Debian) is just because we don't have `cross.sh` for Alpine.
We could fix the script to link the binary statically, but statically linked binary doesn't work on Alpine because of "Cannot determine your user name." error.

* This commit reverts #1405 for newuidmap, and build the stage with `--platform=$TARGETPLATFORM`.
In future we should port over `cross.sh` to Alpine and use `--platform=$BUILDPLATFORM`.

Signed-off-by: Akihiro Suda <10ddef0dea2a66ab193b07198faa879adcb213d8@hco.ntt.co.jp>

tonistiigi/buildkit_poc,tonistiigi/buildkit_poc