Procházet zdrojové kódy

Merge pull request #16562 from Microsoft/10662-fixhttppull

Windows: Fix ADD from URL in dockerfile
Antonio Murdaca před 9 roky
rodič
revize
c300978370
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      daemon/daemon_windows.go

+ 4 - 0
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