Describe the Bug
❗ As reported by @cboulva99 below, this issue is not only affecting the Windows images but also the Linux images.
It's not possible to use the Start-Job cmdlet in the latest Windows Server Core 2019 amd64 SDK image. Using this cmdlet fails with the following error message:
Start-Job: The pwsh executable cannot be found at "C:\Program Files\powershell\.store\powershell.windows.x64\7.2.0\powershell.windows.x64\7.2.0\tools\net6.0\any\pwsh.exe".
Note that 'Start-Job' is not supported by design in scenarios where PowerShell is being hosted in other applications. Instead, usage of the 'ThreadJob' module is recommended in such scenar
ios.
Steps to Reproduce
docker run -it --rm mcr.microsoft.com/dotnet/sdk:6.0.100-windowsservercore-ltsc2019 pwsh "-c" "Start-Job" "-ScriptBlock" "{ Write-Host 'Hello Block' }"
Output:
Start-Job: The pwsh executable cannot be found at "C:\Program Files\powershell\.store\powershell.windows.x64\7.2.0\powershell.windows.x64\7.2.0\tools\net6.0\any\pwsh.exe".
Note that 'Start-Job' is not supported by design in scenarios where PowerShell is being hosted in other applications. Instead, usage of the 'ThreadJob' module is recommended in such scenar
ios.
With previous versions (e.g. 5.0.403-windowsservercore-ltsc2019) it worked as expected:
docker run -it --rm mcr.microsoft.com/dotnet/sdk:5.0.403-windowsservercore-ltsc2019 pwsh "-c" "Start-Job" "-ScriptBlock" "{ Write-Host 'Hello Block' }"
Output:
Id Name PSJobTypeName State HasMoreData Location Command
-- ---- ------------- ----- ----------- -------- -------
1 Job1 BackgroundJob Running True localhost Write-Host 'Hello Block…
Other Information
This issue happens all the time, there's no workaround.
I've noticed that pwsh.exe is actually missing in the above mentioned folder C:\Program Files\powershell\.store\powershell.windows.x64\7.2.0\powershell.windows.x64\7.2.0\tools\net6.0\any.
In 5.0.403-windowsservercore-ltsc2019 pwsh.exe is present in the folder C:\Program Files\powershell\.store\powershell.windows.x64\7.1.5\powershell.windows.x64\7.1.5\tools\net5.0\any
Output of docker version
Client:
Cloud integration: v1.0.20
Version: 20.10.10
API version: 1.41
Go version: go1.16.9
Git commit: b485636
Built: Mon Oct 25 07:47:53 2021
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.10
API version: 1.41 (minimum version 1.24)
Go version: go1.16.9
Git commit: e2f740d
Built: Mon Oct 25 07:43:13 2021
OS/Arch: windows/amd64
Experimental: false
Output of docker info
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Build with BuildKit (Docker Inc., v0.6.3)
compose: Docker Compose (Docker Inc., v2.1.1)
scan: Docker Scan (Docker Inc., 0.9.0)
Server:
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 53
Server Version: 20.10.10
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: ics internal l2bridge l2tunnel nat null overlay private transparent
Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog
Swarm: inactive
Default Isolation: hyperv
Kernel Version: 10.0 19043 (19041.1.amd64fre.vb_release.191206-1406)
Operating System: Windows 10 Enterprise Version 2009 (OS Build 19043.1348)
OSType: windows
Architecture: x86_64
CPUs: 8
Total Memory: 15.88GiB
Name: md1r5gfc
ID: LQ5H:HQ63:QEW4:N3MM:WJ4T:5AXU:UCLH:IFQT:KWD6:XPBM:J4UR:HOQR
Docker Root Dir: C:\ProgramData\Docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
Describe the Bug
❗ As reported by @cboulva99 below, this issue is not only affecting the Windows images but also the Linux images.
It's not possible to use the
Start-Jobcmdlet in the latest Windows Server Core 2019 amd64 SDK image. Using this cmdlet fails with the following error message:Steps to Reproduce
Output:
With previous versions (e.g. 5.0.403-windowsservercore-ltsc2019) it worked as expected:
Output:
Id Name PSJobTypeName State HasMoreData Location Command -- ---- ------------- ----- ----------- -------- ------- 1 Job1 BackgroundJob Running True localhost Write-Host 'Hello Block…Other Information
This issue happens all the time, there's no workaround.
I've noticed that
pwsh.exeis actually missing in the above mentioned folderC:\Program Files\powershell\.store\powershell.windows.x64\7.2.0\powershell.windows.x64\7.2.0\tools\net6.0\any.In 5.0.403-windowsservercore-ltsc2019
pwsh.exeis present in the folderC:\Program Files\powershell\.store\powershell.windows.x64\7.1.5\powershell.windows.x64\7.1.5\tools\net5.0\anyOutput of
docker versionOutput of
docker info