diff --git a/jobs/docker-windows/templates/pre-start.ps1 b/jobs/docker-windows/templates/pre-start.ps1 index 882ef33..604f7c9 100644 --- a/jobs/docker-windows/templates/pre-start.ps1 +++ b/jobs/docker-windows/templates/pre-start.ps1 @@ -1,23 +1,6 @@ $ErrorActionPreference = "Stop"; trap { $host.SetShouldExit(1) } -$mtx = New-Object System.Threading.Mutex($false, "PathMutex") - -if (!$mtx.WaitOne(300000)) { - throw "Could not acquire PATH mutex" -} - -$AddedFolder= "C:\var\vcap\packages\docker-windows\docker\" - -$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path - -if (-not $OldPath.Contains($AddedFolder)) { - $NewPath=$OldPath+';'+$AddedFolder - Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath -} - -$mtx.ReleaseMutex() - C:\var\vcap\packages\docker-windows\docker\dockerd --register-service Start-Service Docker