[docker] Add support for publishing UBI based runtime images

This patch adds a `--use-ubi-runtime` option to the docker build.
When that option is passed for Centos 7 and 8 builds, the Kudu
runtime images (`kudu` & `kudu-python`) will be built using a
UBI base instead of the CentOS base. If the `--use-ubi-runtime`
flag is passed for any unsupported OS, a clear error message will
be printed.

We do not build the development images using the UBI base
because the package repositories in the UBI do not contain
all the packages necessary to build Kudu and support
development. Additionally the benefits of UBI are primarily for
runtime/deployment usage and continuing to use CentOS for the
development can simplify the build.

This patch also required some small changes to how we generated
the published image labels given the UBI images use a slightly
different format than was previously handled.

More can be read about RedHat UBI here:
https://www.redhat.com/en/blog/introducing-red-hat-universal-base-image
https://developers.redhat.com/articles/ubi-faq

I tested building images with `--use-ubi-runtime` on both
CentOS 7 and 8.

Change-Id: I7be121c4ef8422d8aa7556aa163254b43c226b07
Reviewed-on: http://gerrit.cloudera.org:8080/17564
Tested-by: Kudu Jenkins
Reviewed-by: Grant Henke <granthenke@apache.org>
3 files changed