Describe the bug
Using 2-10.0
It appears there is some kind of shim used to redirect /usr/bin/pwsh to /usr/share/powershell/.store/powershell.linux.x64/7.6.1/powershell.linux.x64/7.6.1/tools/net10.0/any
It will start fine initially but if you need to start a nested powershell session, it will fail. This is because the new path gets added to PATH automatically and it tries to start from here instead of /usr/bin
Workaround
Make the "nested" pwsh executable, then it will work fine.
sudo chmod +x '/usr/share/powershell/.store/powershell.linux.x64/7.6.1/powershell.linux.x64/7.6.1/tools/net10.0/any/pwsh'
Which .NET image(s) are you using?
mcr.microsoft.com/dotnet-sdk:2-10.0
Steps to reproduce
Start bash, then start pwsh, then try to start pwsh again
Other information
No response
Output of docker version
Output of docker info
Reactions are currently unavailable
Describe the bug
Using 2-10.0
It appears there is some kind of shim used to redirect /usr/bin/pwsh to /usr/share/powershell/.store/powershell.linux.x64/7.6.1/powershell.linux.x64/7.6.1/tools/net10.0/any
It will start fine initially but if you need to start a nested powershell session, it will fail. This is because the new path gets added to PATH automatically and it tries to start from here instead of /usr/bin
Workaround
Make the "nested" pwsh executable, then it will work fine.
sudo chmod +x '/usr/share/powershell/.store/powershell.linux.x64/7.6.1/powershell.linux.x64/7.6.1/tools/net10.0/any/pwsh'
Which .NET image(s) are you using?
mcr.microsoft.com/dotnet-sdk:2-10.0
Steps to reproduce
Start bash, then start pwsh, then try to start pwsh again
Other information
No response
Output of docker version
Output of docker info