Repository navigation
scripts: update installscript.sh to detect musl and default to non-self-contained version - #627
Merged
Merged
Conversation
…rovider into users/embetten/musl-detection
John Schmeichel (JohnSchmeichel)
approved these changes
Jan 23, 2026
embetten
added a commit
that referenced
this pull request
Jan 29, 2026
…lf-contained version (#627) For #621 In 2.0.0 we updated the install scripts to default to the self-contained version if we were able to detect a supported runtime and architecture. If a non-supported os and architechture, we would default to the non self-contained version. For linux, This change did not take linux musl into account - which would require shipping supported self-contained versions `linux-musl-x64` and `linux-musl-arm64` where we are only shipping linux-x64 and linux-arm64. This proposed change attempts to detect if a linux machine uses musl instead of glibc, and if true, treat it like a non-supported platform and install the non self-contained netcore version. sample dockerfile on alpine with successful build for his branch ``` FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build-env ## dont use this script directly outside of testing this pr branch RUN wget -qO- https://raw.githubusercontent.com/microsoft/artifacts-credprovider/refs/heads/users/embetten/musl-detection/helpers/installcredprovider.sh | sh ARG FEED_URL ARG FEED_ACCESSTOKEN # Optional: Sometimes the http client hangs because of a .NET issue. Setting this in dockerfile helps ENV DOTNET_SYSTEM_NET_HTTP_USESOCKETSHTTPHANDLER=0 ENV VSS_NUGET_EXTERNAL_FEED_ENDPOINTS="{\"endpointCredentials\": [{\"endpoint\":\"$FEED_URL\",\"username\":\"docker\",\"password\":\"$FEED_ACCESSTOKEN\"}]}" WORKDIR /app RUN dotnet new console RUN dotnet new nugetconfig RUN dotnet nuget remove source nuget RUN dotnet nuget add source $FEED_URL -n embettenTest --configfile ./nuget.config RUN dotnet add package Microsoft.Identity.Client.Extensions.Msal --version 4.77.1 RUN dotnet restore --verbosity detailed ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For #621
In 2.0.0 we updated the install scripts to default to the self-contained version if we were able to detect a supported runtime and architecture. If a non-supported os and architechture, we would default to the non self-contained version. For linux, This change did not take linux musl into account - which would require shipping supported self-contained versions
linux-musl-x64andlinux-musl-arm64where we are only shipping linux-x64 and linux-arm64.This proposed change attempts to detect if a linux machine uses musl instead of glibc, and if true, treat it like a non-supported platform and install the non self-contained netcore version.
sample dockerfile on alpine with successful build for his branch