provide docker registry override in remaining scripts

As done with fe2768c73, provide a mechanism to override the docker
registry used for our remaining docker scripts.

docker.io continues to tighten control[1] on access to its registry.
Provide a mechanism within this script to utilize a different registry
for the base ubuntu image.

[1]: https://www.docker.com/blog/november-2024-updated-plans-announcement/

Tested:
- Confirmed script defaults still works as expected
- Confirmed the following also works now:
  export DOCKER_REG=public.ecr.aws/ubuntu
- Confirmed where applicable that this also works(fedora):
  export DOCKER_REG=public.ecr.aws/docker/library

Change-Id: Ib237183fb9f27573643783b3988cb00614749f4c
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/scripts/build-qemu-robot-docker.sh b/scripts/build-qemu-robot-docker.sh
index 49fa985..c8e402a 100755
--- a/scripts/build-qemu-robot-docker.sh
+++ b/scripts/build-qemu-robot-docker.sh
@@ -8,6 +8,9 @@
 #                    default is empty, and no mirror is used.
 #  PIP_MIRROR:       <optional, the URL of a PIP mirror>
 #                    default is empty, and no mirror is used.
+#  DOCKER_REG:       <optional, the URL of a docker registry to utilize
+#                    instead of the default docker hub
+#                    (ex. public.ecr.aws/ubuntu)
 #
 #  Parameters:
 #   parm1:  <optional, the name of the docker image to generate>
@@ -22,6 +25,7 @@
 DISTRO=${2:-"ubuntu:jammy"}
 UBUNTU_MIRROR=${UBUNTU_MIRROR:-""}
 PIP_MIRROR=${PIP_MIRROR:-""}
+docker_reg=${DOCKER_REG:-"docker.io"}
 
 MIRROR=""
 if [[ -n "${UBUNTU_MIRROR}" ]]; then
@@ -45,7 +49,7 @@
 ################################# docker img # #################################
 # Create docker image that can run QEMU and Robot Tests
 Dockerfile=$(cat << EOF
-FROM ${DISTRO}
+FROM ${docker_reg}/${DISTRO}
 
 ${MIRROR}