This is the method I used to run Powershell on Alpine Linux as there was no official repo available (you can only install manually). So here I'm using Docker to automatically provide the latest version of Powershell.
With this you can run Powershell scripts on your host (without being in a docker container shell), just use the normal pwsh command line paramaters.
pwsh my-script.ps1Step 1: Install Docker
Step 2: Download to your /usr/local/bin folder:
sudo wget -O /usr/local/bin/pwsh "https://gist.githubusercontent.com/mattbell87/f085dfb1d8ff4a019fc03c5075dca4
26/raw/472ee1af630350513185a6df96e9fb1e9caf3d19/pwsh.sh"Step 3: Mark as executable:
sudo chmod +x /usr/local/bin/pwsh