Configure docker private registry for K3s-based installation

Change-Id: Iaf3a678f337b0241160b57c4876ffc671a4a3cbf
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/installers/full_install_osm.sh b/installers/full_install_osm.sh
index 6cde383..ee51e2f 100755
--- a/installers/full_install_osm.sh
+++ b/installers/full_install_osm.sh
@@ -430,6 +430,9 @@
     elif [ "${K8S_CLUSTER_ENGINE}" == "k3s" ]; then
         K3S_INSTALL_OPTS="-i ${OSM_DEFAULT_IP} -D ${OSM_DEVOPS} ${DEBUG_INSTALL}"
         [ -n "${DOCKER_PROXY_URL}" ] && K3S_INSTALL_OPTS="${K3S_INSTALL_OPTS} -p ${DOCKER_PROXY_URL}"
+        [ -n "${DOCKER_REGISTRY_URL}" ] && K3S_INSTALL_OPTS="${K3S_INSTALL_OPTS} -d ${DOCKER_REGISTRY_URL}"
+        [ -n "${DOCKER_REGISTRY_USER}" ] && K3S_INSTALL_OPTS="${K3S_INSTALL_OPTS} -u ${DOCKER_REGISTRY_USER}"
+        [ -n "${DOCKER_REGISTRY_PASSWORD}" ] && K3S_INSTALL_OPTS="${K3S_INSTALL_OPTS} -P ${DOCKER_REGISTRY_PASSWORD}"
         # The K3s installation script will automatically take the HTTP_PROXY, HTTPS_PROXY and NO_PROXY,
         # as well as the CONTAINERD_HTTP_PROXY, CONTAINERD_HTTPS_PROXY and CONTAINERD_NO_PROXY variables
         # from the shell, if they are present, and write them to the environment file of k3s systemd service,
@@ -500,6 +503,7 @@
             echo "Kubeadm requires docker, so docker will be installed."
         fi
         install_docker_ce
+        [ -n "${DOCKER_REGISTRY_URL}" ] && docker_login
     fi
     track docker_ce docker_ce_ok