These changes modify the build to leave CGO enabled (as opposed to
disabling it explicitly.) This will make it possible to load Go
libraries dynamically.
Since CGO is enabled, we have cannot use the scratch or alpine base
images any more. To replace them, we are using the "distroless" images
from GoogleContainerTools[1]. These images are intended to run
statically compiled languages like Go and Rust. They have a minimal
number of dependencies (importantly, glibc) and produce relatively small
images (~30MB.) The old images were ~20MB in size.
These changes enable a second "debug" image flavor which is based off
distroless "debug". This image includes a shell and other things that
are useful for debug purposes. In addition, the image includes the
"diff" program which is used by opa fmt --diff and required by the
open-policy-agent/library repo build.
[1] https://github.com/GoogleContainerTools/distroless
Signed-off-by: Torin Sandall <torinsandall@gmail.com>