-
Notifications
You must be signed in to change notification settings - Fork 2k
Add CrossGen2 Dockerfiles for the various options we want to perf test #1818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
35ca2d8
ea06b8e
745c50a
0de038b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,101 +1,11 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
|
||
# Create standard image | ||
FROM $REPO:5.0-alpine3.11 AS StandardImage | ||
|
||
# Install .NET Core | ||
|
||
RUN dotnet_version=5.0.0-preview.2.20160.6 \ | ||
&& wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='f8dcf9f498feffbca4b0649086cffd298cd98189b2950c32dd52b07179b7f33e1acfe14ae59a266502a3518089ca55f224e007628d16194f94be7dc419c1b2b4' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime | ||
FROM $REPO:5.0-alpine3.11 | ||
|
||
# Install ASP.NET Core | ||
RUN aspnetcore_version=5.0.0-preview.2.20167.3 \ | ||
&& wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-musl-x64.tar.gz \ | ||
ENV ASPNET_VERSION 5.0.0-preview.2.20167.3 | ||
|
||
RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ | ||
&& aspnetcore_sha512='029ed32f8a7dfdb258438177b7fd40c187830db35b3d973dec296d8948f99d30a74269c45d31876c9b4533b8d7b6af65dea319299bd9a7081c6881cf026274b4' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ | ||
&& rm aspnetcore.tar.gz | ||
|
||
RUN dotnet --list-runtimes | ||
|
||
# CROSSGEN the binaries from the standard image | ||
FROM $REPO:5.0-alpine3.11 AS SdkImage | ||
|
||
ENV \ | ||
# Unset the value from the base image | ||
ASPNETCORE_URLS= \ | ||
# Disable the invariant mode (set in base image) | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ | ||
# Enable correct mode for dotnet watch (only mode supported in a container) | ||
DOTNET_USE_POLLING_FILE_WATCHER=true \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 \ | ||
# Skip extraction of XML docs - generally not useful within an image/container - helps performance | ||
NUGET_XMLDOC_MODE=skip \ | ||
# PowerShell telemetry for docker image usage | ||
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetCoreSDK-Alpine-3.10 | ||
|
||
# Add dependencies for disabling invariant mode (set in base image) | ||
RUN apk add --no-cache icu-libs | ||
|
||
# Install .NET Core SDK | ||
RUN dotnet_sdk_version=5.0.100-preview.2.20175.2 \ | ||
&& wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$dotnet_sdk_version/dotnet-sdk-$dotnet_sdk_version-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='07b2e91410306297d7d8ccd84aa00be06181efb8cb3cc4fab57cd370aca65409ba59c87dba70d2b46e1dd05c0597c2f0c8f38cde35032910febb08f51b65731a' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -C /usr/share/dotnet -oxzf dotnet.tar.gz \ | ||
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet \ | ||
&& rm dotnet.tar.gz \ | ||
# Trigger first run experience by running arbitrary cmd | ||
&& dotnet help | ||
|
||
# Install PowerShell global tool | ||
RUN powershell_version=7.0.0 \ | ||
&& wget -O PowerShell.Linux.Alpine.$powershell_version.nupkg https://pwshtool.blob.core.windows.net/tool/$powershell_version/PowerShell.Linux.Alpine.$powershell_version.nupkg \ | ||
&& powershell_sha512='afca5d8553d612e36d04597de14cdba9731442d567d25fb9b0f1451116f299f773b4f49b5be7d4d89e3e874eb43f8c062ae70c2ed1d620244a2a52ba443cf4cb' \ | ||
&& echo "$powershell_sha512 PowerShell.Linux.Alpine.$powershell_version.nupkg" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/powershell \ | ||
&& dotnet tool install --add-source / --tool-path /usr/share/powershell --version $powershell_version PowerShell.Linux.Alpine \ | ||
&& dotnet nuget locals all --clear \ | ||
&& rm PowerShell.Linux.Alpine.$powershell_version.nupkg \ | ||
&& chmod 755 /usr/share/powershell/pwsh \ | ||
&& ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ | ||
# To reduce image size, remove the copy nupkg that nuget keeps. | ||
&& find /usr/share/powershell -print | grep -i '.*[.]nupkg$' | xargs rm \ | ||
# Add ncurses-terminfo-base to resolve psreadline dependency | ||
&& apk add --no-cache ncurses-terminfo-base | ||
|
||
RUN dotnet --list-runtimes | ||
RUN dotnet --list-sdks | ||
|
||
RUN dotnet --list-runtimes | grep Microsoft.NETCore.App | cut -d ' ' -f 2 > runtime-version.txt | ||
RUN dotnet --list-runtimes | grep Microsoft.AspNetCore.App | cut -d ' ' -f 2 > aspnet-version.txt | ||
|
||
RUN dotnet new console -o /tmp | ||
COPY nuget.config /tmp | ||
RUN dotnet publish /tmp/tmp.csproj -p:PublishReadyToRun=true -p:PublishReadyToRunUseCrossgen2=true -r linux-musl-x64 | ||
COPY --from=StandardImage /usr/share/dotnet/shared/Microsoft.NETCore.App /usr/cpinput | ||
COPY --from=StandardImage /usr/share/dotnet/shared/Microsoft.AspNetCore.App /usr/cpaspinput | ||
RUN mkdir /usr/input | ||
RUN cp /usr/cpinput/$(cat runtime-version.txt)/*.dll /usr/input | ||
RUN cp /usr/cpaspinput/$(cat aspnet-version.txt)/*.dll /usr/input | ||
RUN mkdir /usr/crossgen2 | ||
RUN ~/.nuget/packages/microsoft.netcore.app.crossgen2.linux-musl-x64/$(cat runtime-version.txt)/tools/crossgen2 --inputbubble -o /usr/crossgen2/sharedframework.dll --composite -O --Os /usr/input/*.dll | ||
|
||
COPY --from=StandardImage /usr/share/dotnet /usr/output | ||
RUN for b in /usr/output/shared/Microsoft.NETCore.App/$(cat runtime-version.txt)/*.dll; do a=/usr/crossgen2/`basename ${b}`; test -e ${a} && cp ${a} /usr/output/shared/Microsoft.NETCore.App/$(cat runtime-version.txt); done | ||
RUN for b in /usr/output/shared/Microsoft.AspNetCore.App/$(cat aspnet-version.txt)/*.dll; do a=/usr/crossgen2/`basename ${b}`; test -e ${a} && cp ${a} /usr/output/shared/Microsoft.AspNetCore.App/$(cat aspnet-version.txt); done | ||
RUN cp /usr/crossgen2/sharedframework.dll /usr/output/shared/Microsoft.NETCore.App/$(cat runtime-version.txt) | ||
|
||
# Create optimized monolithic docker image | ||
FROM $REPO:5.0-alpine3.11 | ||
|
||
COPY --from=SdkImage /usr/output /usr/share/dotnet | ||
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# TODO: define a shared base stage (build infra doesn't support) | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime | ||
|
||
|
||
# Installer image | ||
FROM $REPO:5.0-alpine3.11-composite as installer | ||
|
||
# Install crossgen2 | ||
RUN wget -O crossgen2.tar.gz https://dotnetbinaries.blob.core.windows.net/dockerassets/microsoft.netcore.app.crossgen2.linux-musl-x64.$DOTNET_VERSION.tar.gz \ | ||
&& crossgen2_sha512='6beecdd14e52d48b8e794b73dab4b148a50744c1a50f1108c1c30bc1df20fb2cd1741359e7a3f3803e8576ef166308b0d558a18ea6456b343586056025b63e1c' \ | ||
&& echo "$crossgen2_sha512 crossgen2.tar.gz" | sha512sum -c - \ | ||
&& mkdir /crossgen2 \ | ||
&& tar -C /crossgen2 -oxzf crossgen2.tar.gz \ | ||
&& rm crossgen2.tar.gz | ||
|
||
ENV ASPNET_VERSION 5.0.0-preview.2.20167.3 | ||
|
||
RUN \ | ||
# Retrieve ASP.NET | ||
wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ | ||
&&aspnetcore_sha512='029ed32f8a7dfdb258438177b7fd40c187830db35b3d973dec296d8948f99d30a74269c45d31876c9b4533b8d7b6af65dea319299bd9a7081c6881cf026274b4' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ | ||
&& rm aspnetcore.tar.gz \ | ||
\ | ||
# Crossgen .NET Core | ||
&& /crossgen2/crossgen2 \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @davidwrighton - can you help me out with the correct crossgen2 build args here? This is for the following scenario:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need a -r argument to reference the runtime level bits. So, add an argument like -r /dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/*.dll to the command line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. btw, does the change to publish crossgen2 binaries work? I wasn't able to test the end to end scenario without checking in. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @davidwrighton for the guidance on which args to use. I did run into an issue with the arg which I am not sure if it is a known issue or something wrong with my usage. I had issues when -r was specified just before the input-files. The following Dockerfile snippets illustrate what I mean. Broken - error regarding no input-files specified
Working
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I hooked-up the docker unit tests which run an e2e app scenario. The tests are passing which is encouraging. |
||
--composite --inputbubble -O --Os \ | ||
-r /usr/share/dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/*.dll \ | ||
-o /usr/share/dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/Microsoft.AspNetCore.App.SharedFramework.dll \ | ||
/usr/share/dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/*.dll | ||
|
||
|
||
# ASP.NET Core image | ||
FROM $REPO:5.0-alpine3.11-composite | ||
|
||
ENV ASPNET_VERSION 5.0.0-preview.2.20167.3 | ||
|
||
COPY --from=installer ["/usr/share/dotnet/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# TODO: define a shared base stage (build infra doesn't support) | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
|
||
|
||
# Installer image | ||
FROM $REPO:5.0-alpine3.11 as installer | ||
|
||
ENV DOTNET_VERSION 5.0.0-preview.2.20160.6 | ||
|
||
# Install crossgen2 | ||
RUN wget -O crossgen2.tar.gz https://dotnetbinaries.blob.core.windows.net/dockerassets/microsoft.netcore.app.crossgen2.linux-musl-x64.$DOTNET_VERSION.tar.gz \ | ||
&& crossgen2_sha512='6beecdd14e52d48b8e794b73dab4b148a50744c1a50f1108c1c30bc1df20fb2cd1741359e7a3f3803e8576ef166308b0d558a18ea6456b343586056025b63e1c' \ | ||
&& echo "$crossgen2_sha512 crossgen2.tar.gz" | sha512sum -c - \ | ||
&& mkdir /crossgen2 \ | ||
&& tar -C /crossgen2 -oxzf crossgen2.tar.gz \ | ||
&& rm crossgen2.tar.gz | ||
|
||
ENV ASPNET_VERSION 5.0.0-preview.2.20167.3 | ||
|
||
RUN \ | ||
# Retrieve .NET and ASP.NET | ||
wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ | ||
&& aspnetcore_sha512='029ed32f8a7dfdb258438177b7fd40c187830db35b3d973dec296d8948f99d30a74269c45d31876c9b4533b8d7b6af65dea319299bd9a7081c6881cf026274b4' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& mkdir /dotnet \ | ||
&& tar -C /dotnet -ozxf aspnetcore.tar.gz \ | ||
&& rm aspnetcore.tar.gz \ | ||
\ | ||
# Crossgen .NET Core | ||
&& mkdir -p /work/input \ | ||
&& cp /dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/*.dll /work/input \ | ||
&& cp /dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/*.dll /work/input \ | ||
&& mkdir -p /work/output \ | ||
&& /crossgen2/crossgen2 \ | ||
--composite --inputbubble -O --Os \ | ||
-o /work/output/Microsoft.AspNetCore.App.SharedFramework.dll \ | ||
/work/input/*.dll \ | ||
&& for b in /dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/*.dll; \ | ||
do \ | ||
a=/work/output/`basename ${b}`; \ | ||
test -e ${a} && cp ${a} /dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION; \ | ||
done \ | ||
&& for b in /dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION/*.dll; \ | ||
do \ | ||
a=/work/output/`basename ${b}`; \ | ||
test -e ${a} && cp ${a} /dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION; \ | ||
done \ | ||
&& cp /work/output/Microsoft.AspNetCore.App.SharedFramework.dll /dotnet/shared/Microsoft.AspNetCore.App/$ASPNET_VERSION \ | ||
&& rm -r /work | ||
|
||
|
||
# ASP.NET image | ||
FROM $REPO:5.0-alpine3.11 | ||
|
||
ENV DOTNET_VERSION=5.0.0-preview.2.20160.6 \ | ||
ASPNET_VERSION=5.0.0-preview.2.20167.3 | ||
|
||
COPY --from=installer ["/dotnet", "/usr/share/dotnet"] | ||
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime | ||
FROM $REPO:5.0-alpine3.11-composite | ||
|
||
# Install ASP.NET Core | ||
ENV ASPNET_VERSION 5.0.0-preview.2.20167.3 | ||
|
||
RUN wget -O aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-musl-x64.tar.gz \ | ||
&& aspnetcore_sha512='029ed32f8a7dfdb258438177b7fd40c187830db35b3d973dec296d8948f99d30a74269c45d31876c9b4533b8d7b6af65dea319299bd9a7081c6881cf026274b4' \ | ||
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ | ||
&& tar -ozxf aspnetcore.tar.gz -C /usr/share/dotnet ./shared/Microsoft.AspNetCore.App \ | ||
&& rm aspnetcore.tar.gz |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# TODO: define a shared base stage (build infra doesn't support) | ||
ARG REPO=mcr.microsoft.com/dotnet/core/runtime-deps | ||
|
||
|
||
# Installer image | ||
FROM $REPO:5.0-alpine3.11 as installer | ||
|
||
ENV DOTNET_VERSION 5.0.0-preview.2.20160.6 | ||
|
||
# Install crossgen2 | ||
RUN wget -O crossgen2.tar.gz https://dotnetbinaries.blob.core.windows.net/dockerassets/microsoft.netcore.app.crossgen2.linux-musl-x64.$DOTNET_VERSION.tar.gz \ | ||
&& crossgen2_sha512='6beecdd14e52d48b8e794b73dab4b148a50744c1a50f1108c1c30bc1df20fb2cd1741359e7a3f3803e8576ef166308b0d558a18ea6456b343586056025b63e1c' \ | ||
&& echo "$crossgen2_sha512 crossgen2.tar.gz" | sha512sum -c - \ | ||
&& mkdir /crossgen2 \ | ||
&& tar -C /crossgen2 -oxzf crossgen2.tar.gz \ | ||
&& rm crossgen2.tar.gz | ||
|
||
|
||
RUN \ | ||
# Retrieve .NET | ||
wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='f8dcf9f498feffbca4b0649086cffd298cd98189b2950c32dd52b07179b7f33e1acfe14ae59a266502a3518089ca55f224e007628d16194f94be7dc419c1b2b4' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir /dotnet \ | ||
&& tar -C /dotnet -oxzf dotnet.tar.gz \ | ||
&& rm dotnet.tar.gz \ | ||
\ | ||
# Crossgen .NET | ||
&& /crossgen2/crossgen2 \ | ||
--composite --inputbubble -O --Os \ | ||
-o /dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/Microsoft.NETCore.App.SharedFramework.dll \ | ||
/dotnet/shared/Microsoft.NETCore.App/$DOTNET_VERSION/*.dll | ||
|
||
|
||
# .NET runtime image | ||
FROM $REPO:5.0-alpine3.11 | ||
|
||
ENV DOTNET_VERSION 5.0.0-preview.2.20160.6 | ||
|
||
COPY --from=installer ["/dotnet", "/usr/share/dotnet"] | ||
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
ARG REPO=mcr.microsoft.com/dotnet/core/aspnet | ||
FROM $REPO:5.0-alpine3.11 | ||
|
||
ENV \ | ||
# Unset the value from the base image | ||
ASPNETCORE_URLS= \ | ||
DOTNET_SDK_VERSION=5.0.100-preview.2.20175.2 \ | ||
# Disable the invariant mode (set in base image) | ||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ | ||
# Enable correct mode for dotnet watch (only mode supported in a container) | ||
DOTNET_USE_POLLING_FILE_WATCHER=true \ | ||
LC_ALL=en_US.UTF-8 \ | ||
LANG=en_US.UTF-8 \ | ||
# Skip extraction of XML docs - generally not useful within an image/container - helps performance | ||
NUGET_XMLDOC_MODE=skip \ | ||
# PowerShell telemetry for docker image usage | ||
POWERSHELL_DISTRIBUTION_CHANNEL=PSDocker-DotnetCoreSDK-Alpine-3.10 | ||
|
||
# Add dependencies for disabling invariant mode (set in base image) | ||
RUN apk add --no-cache icu-libs | ||
|
||
# Install .NET Core SDK | ||
RUN wget -O dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-musl-x64.tar.gz \ | ||
&& dotnet_sha512='07b2e91410306297d7d8ccd84aa00be06181efb8cb3cc4fab57cd370aca65409ba59c87dba70d2b46e1dd05c0597c2f0c8f38cde35032910febb08f51b65731a' \ | ||
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/dotnet \ | ||
&& tar -ozxf dotnet.tar.gz -C /usr/share/dotnet ./packs ./sdk ./templates \ | ||
&& rm dotnet.tar.gz \ | ||
# Trigger first run experience by running arbitrary cmd | ||
&& dotnet help | ||
|
||
# Install PowerShell global tool | ||
RUN powershell_version=7.0.0 \ | ||
&& wget -O PowerShell.Linux.Alpine.$powershell_version.nupkg https://pwshtool.blob.core.windows.net/tool/$powershell_version/PowerShell.Linux.Alpine.$powershell_version.nupkg \ | ||
&& powershell_sha512='afca5d8553d612e36d04597de14cdba9731442d567d25fb9b0f1451116f299f773b4f49b5be7d4d89e3e874eb43f8c062ae70c2ed1d620244a2a52ba443cf4cb' \ | ||
&& echo "$powershell_sha512 PowerShell.Linux.Alpine.$powershell_version.nupkg" | sha512sum -c - \ | ||
&& mkdir -p /usr/share/powershell \ | ||
&& dotnet tool install --add-source / --tool-path /usr/share/powershell --version $powershell_version PowerShell.Linux.Alpine \ | ||
&& dotnet nuget locals all --clear \ | ||
&& rm PowerShell.Linux.Alpine.$powershell_version.nupkg \ | ||
&& chmod 755 /usr/share/powershell/pwsh \ | ||
&& ln -s /usr/share/powershell/pwsh /usr/bin/pwsh \ | ||
# To reduce image size, remove the copy nupkg that nuget keeps. | ||
&& find /usr/share/powershell -print | grep -i '.*[.]nupkg$' | xargs rm \ | ||
# Add ncurses-terminfo-base to resolve psreadline dependency | ||
&& apk add --no-cache ncurses-terminfo-base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a temporary solution I built and uploaded until we get on a build that includes the official crossgen2 artifacts - dotnet/runtime#34623