Browse code

Windows: Fix ADD from URL in dockerfile

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

John Howard authored on 2015/09/25 04:10:41
Showing 1 changed files
... ...
@@ -36,6 +36,10 @@ func checkKernel() error {
36 36
 // adaptContainerSettings is called during container creation to modify any
37 37
 // settings necessary in the HostConfig structure.
38 38
 func (daemon *Daemon) adaptContainerSettings(hostConfig *runconfig.HostConfig, adjustCPUShares bool) {
39
+	if hostConfig == nil {
40
+		return
41
+	}
42
+
39 43
 	if hostConfig.CPUShares < 0 {
40 44
 		logrus.Warnf("Changing requested CPUShares of %d to minimum allowed of %d", hostConfig.CPUShares, windowsMinCPUShares)
41 45
 		hostConfig.CPUShares = windowsMinCPUShares