Add waiter to check public connectivity

Related-Prod: PRODX-3456
Change-Id: I7e3b645c59d7c2c603381b7034a60a1cbebd4f8e
diff --git a/de/heat-templates/scripts/instance_boot.sh b/de/heat-templates/scripts/instance_boot.sh
index 68a4a62..e3a8969 100644
--- a/de/heat-templates/scripts/instance_boot.sh
+++ b/de/heat-templates/scripts/instance_boot.sh
@@ -530,6 +530,12 @@
     systemctl restart systemd-resolved
     # Make sure local hostname is present in /etc/hosts
     sed -i "s/127.0.0.1 localhost/127.0.0.1 localhost\n${CONTROL_IP_ADDRESS} $(hostname -s).cluster.local $(hostname -s)/" /etc/hosts
+
+    function _check_access {
+        curl --connect-timeout 10 ${DOCKER_UCP_IMAGE%%/*} || (sleep 1; /bin/false)
+    }
+
+    retry 180 "Failed to wait for external networks reachable." _check_access
 }
 
 function workaround_default_forward_policy {