Make the user experience nicer
authorMichael Brown <michael@netdirect.ca>
Tue, 21 Jan 2014 06:06:26 +0000 (01:06 -0500)
committerMichael Brown <michael@netdirect.ca>
Tue, 21 Jan 2014 06:08:00 +0000 (01:08 -0500)
* Pull down the docker image before trying to use it
  This avoids long periods of "is the system doing anything?"
* Don't bother asking the user to confirm the container's ssh key

launcher

index 851ad4cc612b73f60c526ed9ba9287280193b9f0..a6dbe6d471f9895f68a81745e598c198bc954ccb 100755 (executable)
--- a/launcher
+++ b/launcher
@@ -118,6 +118,9 @@ fi
 
 case "$command" in
   bootstrap)
+      # Is the image available?
+      # If not, pull it here so the user is aware what's happening.
+      docker history $image >/dev/null 2>&1 || docker pull $image
 
       set_template_info
 
@@ -165,7 +168,7 @@ case "$command" in
            cid="`cat $cidfile`"
            address="`docker port $cid 22`"
            split=(${address//:/ })
-           exec ssh root@${split[0]} -p ${split[1]}
+           exec ssh -o StrictHostKeyChecking=no root@${split[0]} -p ${split[1]}
       fi
       ;;