dotnet/install-scripts

Support for dotnet-install.ps1 on Linux

gdbarron opened this issue · 2 comments

Are there any plans to support the PowerShell install script on Linux? I see right now it relies on windows only Get-CimInstance to retrieve the architecture which obviously won't work. I'm wondering if this is something that's feasible, but just hasn't been done yet.

My use case is installing on Alpine Linux (in Docker) so I can use Publish-Module in my pipeline. For now, I'm using this workaround:

    - apk add bash
    - /bin/bash
    - wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
    - chmod +x dotnet-install.sh
    - ./dotnet-install.sh
    - exit # from bash and back into PS
    - $env:PATH += ':/root/.dotnet'
    - Publish-Module -Path ......

We don't currently have plans, but I agree that it makes sense to do. It would be a decent chunk of work, though - the current powershell script has hard-coded windows asset paths and would need to learn the per-OS pivots that the bash script currently has.