Skip to content

PowerShell Core cannot start a PS Job in .NET Core SDK Alpine image #6740

@jeepingben

Description

@jeepingben

Describe the bug

There appears to be a regression of issue #1922

docker run  -it --rm mcr.microsoft.com/dotnet/sdk:9.0-alpine pwsh -Command "& { Start-Job { 'test' } | Receive-Job -Wait }"
OpenError: [localhost] An error occurred while starting the background process. Error reported: An error occurred trying to start process '/usr/share/powershell/.store/powershell.linux.alpine/7.5.3/powershell.linux.alpine/7.5.3/tools/net9.0/any/pwsh' with working directory '/'. No such file or directory.
[user@umwey6bv docker-ci-powercli]$ 
[admin@tenable-umwey6bv docker-ci-powercli]$ docker run  -it --rm mcr.microsoft.com/dotnet/sdk:8.0-alpine pwsh -Command "& { Start-Job { 'test' } | Receive-Job -Wait }"
OpenError: [localhost] An error occurred while starting the background process. Error reported: An error occurred trying to start process '/usr/share/powershell/.store/powershell.linux.alpine/7.4.12/powershell.linux.alpine/7.4.12/tools/net8.0/any/pwsh' with working directory '/'. No such file or directory.
[user@umwey6bv docker-ci-powercli]$ 

The fix shown in the declined PR for issue 1922 (replacing $PSHOME/pwsh with /usr/bin/pwsh) fixes the issue for me

Which .NET image(s) are you using?

mcr.microsoft.com/dotnet/sdk 8.0-alpine 2827d64f3133

Steps to reproduce

docker run -it --rm mcr.microsoft.com/dotnet/sdk:9.0-alpine pwsh -Command "& { Start-Job { 'test' } | Receive-Job -Wait }"

docker run -it --rm mcr.microsoft.com/dotnet/sdk:8.0-alpine pwsh -Command "& { Start-Job { 'test' } | Receive-Job -Wait }"

Other information

No response

Output of docker version

Client: Docker Engine - Community
 Version:           28.4.0
 API version:       1.51
 Go version:        go1.24.7
 Git commit:        d8eb465
 Built:             Wed Sep  3 20:59:27 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          28.4.0
  API version:      1.51 (minimum version 1.24)
  Go version:       go1.24.7
  Git commit:       249d679
  Built:            Wed Sep  3 20:56:49 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.7.28
  GitCommit:        b98a3aace656320842a23f4a392a33f46af97866
 runc:
  Version:          1.3.0
  GitCommit:        v1.3.0-0-g4ca628d1
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Output of docker info

Client: Docker Engine - Community
 Version:    28.4.0
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.28.0
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.39.4
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 27
  Running: 0
  Paused: 0
  Stopped: 27
 Images: 34
 Server Version: 28.4.0
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b98a3aace656320842a23f4a392a33f46af97866
 runc version: v1.3.0-0-g4ca628d1
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 4.18.0-553.75.1.el8_10.x86_64
 Operating System: Oracle Linux Server 8.10
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.486GiB
 Name: umwey6bv
 ID: 4W3S:ZPHT:RDXV:LCOI:OUCR:HV5E:OBPJ:6HHS:5PXQ:JY3G:NPU5:BKSA
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false

Metadata

Metadata

Labels

area-externalIssues in external projects or services that affect .NET container images

Type

No fields configured for Bug.

Projects

Status

Tracking

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions