From 4437543c47ad5ad797eb0c97d3a6cffbe4239148 Mon Sep 17 00:00:00 2001 From: John Howard Date: Thu, 24 Sep 2015 12:10:41 -0700 Subject: [PATCH] Windows: Fix ADD from URL in dockerfile Signed-off-by: John Howard Upstream-commit: 608b3db5c8ae0515270e058e3406726fb0d30852 Component: engine --- components/engine/daemon/daemon_windows.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/engine/daemon/daemon_windows.go b/components/engine/daemon/daemon_windows.go index 33d5049710..832a77914e 100644 --- a/components/engine/daemon/daemon_windows.go +++ b/components/engine/daemon/daemon_windows.go @@ -36,6 +36,10 @@ func checkKernel() error { // adaptContainerSettings is called during container creation to modify any // settings necessary in the HostConfig structure. func (daemon *Daemon) adaptContainerSettings(hostConfig *runconfig.HostConfig, adjustCPUShares bool) { + if hostConfig == nil { + return + } + if hostConfig.CPUShares < 0 { logrus.Warnf("Changing requested CPUShares of %d to minimum allowed of %d", hostConfig.CPUShares, windowsMinCPUShares) hostConfig.CPUShares = windowsMinCPUShares