Created
November 17, 2014 23:23
-
-
Save broquaint/b5e7b4d5af8177d9dffb to your computer and use it in GitHub Desktop.
A script to get docker booting under wscript.exe (mostly so I don't lose it)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Wee script to get docker into a working state. | |
* Once run one should be able to ssh without needing cmd.exe pain. | |
*/ | |
// Closer to what I expect. | |
function run(cmd) { | |
var WshShell = new ActiveXObject("WScript.Shell"), | |
oExec = WshShell.Exec(cmd); | |
// Let it run. | |
while (oExec.Status == 0) | |
WScript.Sleep(100); | |
// Get the output. | |
return oExec.StdOut.ReadLine(); | |
} | |
function note(msg) { | |
WScript.StdOut.WriteLine("- "+msg); | |
} | |
note( run("boot2docker init") ); | |
if(!run("boot2docker status").match(/running/)) { | |
run("boot2docker up"); | |
} else { | |
note("boot2docker already up"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment