-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
Description
I wanted to do some testing with PowerShell in docker. The natural choice is to use the .NET SDK container image. But I ccan't because PowerShell is installed in a bespoke way.
root@88f149c70769:/# dotnet tool list -g
Package Id Version Commands
-------------------------------------
root@88f149c70769:/# dotnet tool install -g powershell
Tools directory '/root/.dotnet/tools' is not currently on the PATH environment variable.
If you are using bash, you can add it to your profile by running the following command:
cat << \EOF >> ~/.bash_profile
# Add .NET Core SDK tools
export PATH="$PATH:/root/.dotnet/tools"
EOF
You can add it to the current session by running the following command:
export PATH="$PATH:/root/.dotnet/tools"
You can invoke the tool using the following command: pwsh
Tool 'powershell' (version '7.5.4') was successfully installed.
root@88f149c70769:/# export PATH="$PATH:/root/.dotnet/tools"
root@88f149c70769:/# which pwsh
/usr/bin/pwshI wanted to use the GA version, but that's not convenient. If PowerShell was installed as a tool, I could.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog