Browse code

Windows: Allow nanoserver image for CLI

Signed-off-by: John Howard <jhoward@microsoft.com>

John Howard authored on 2016/07/21 01:59:52
Showing 1 changed files
... ...
@@ -61,12 +61,13 @@ var (
61 61
 	// driver of the daemon. This is initialized in docker_utils by sending
62 62
 	// a version call to the daemon and examining the response header.
63 63
 	daemonStorageDriver string
64
-)
65 64
 
66
-const (
67 65
 	// WindowsBaseImage is the name of the base image for Windows testing
66
+	// Environment variable WINDOWS_BASE_IMAGE can override this
68 67
 	WindowsBaseImage = "windowsservercore"
68
+)
69 69
 
70
+const (
70 71
 	// DefaultImage is the name of the base image for the majority of tests that
71 72
 	// are run across suites
72 73
 	DefaultImage = "busybox"
... ...
@@ -128,4 +129,9 @@ func init() {
128 128
 	}
129 129
 	volumesConfigPath = dockerBasePath + "/volumes"
130 130
 	containerStoragePath = dockerBasePath + "/containers"
131
+
132
+	if len(os.Getenv("WINDOWS_BASE_IMAGE")) > 0 {
133
+		WindowsBaseImage = os.Getenv("WINDOWS_BASE_IMAGE")
134
+		fmt.Println("INFO: Windows Base image is ", WindowsBaseImage)
135
+	}
131 136
 }