Cannot start nested PWSH due to executable permission problems
- Dominant language
- Dockerfile
- Stars
- 4.9k
- Forks
- 2k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 26
Description
### 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`
```console
```
### Output of `docker info`
```console
```
Contributor guide
Assessment
This issue has not been assessed yet.