diff --git a/al2/x86_64/standard/3.0/Dockerfile b/al2/x86_64/standard/3.0/Dockerfile index 55c98f0f..26bf6588 100644 --- a/al2/x86_64/standard/3.0/Dockerfile +++ b/al2/x86_64/standard/3.0/Dockerfile @@ -422,8 +422,10 @@ RUN n $NODE_12_VERSION && npm install --save-dev -g -f grunt && npm install --s #=======================End of layer: runtimes_2 ================= FROM runtimes_2 AS runtimes_3 -#DotNet 3.1 +# .NET Core ENV DOTNET_31_SDK_VERSION="3.1.419" +ENV DOTNET_5_SDK_VERSION="5.0.408" +ENV DOTNET_6_SDK_VERSION="6.0.301" ENV DOTNET_ROOT="/root/.dotnet" # Add .NET Core 3.1 Global Tools install folder to PATH @@ -431,6 +433,16 @@ RUN /usr/local/bin/dotnet-install.sh -v $DOTNET_31_SDK_VERSION \ && dotnet --list-sdks \ && rm -rf /tmp/* +# Add .NET Core 5 Global Tools install folder to PATH +RUN /usr/local/bin/dotnet-install.sh -v $DOTNET_5_SDK_VERSION \ + && dotnet --list-sdks \ + && rm -rf /tmp/* + +# Add .NET Core 6 Global Tools install folder to PATH +RUN /usr/local/bin/dotnet-install.sh -v $DOTNET_6_SDK_VERSION \ + && dotnet --list-sdks \ + && rm -rf /tmp/* + ## Trigger the population of the local package cache ENV NUGET_XMLDOC_MODE skip RUN set -ex \ diff --git a/al2/x86_64/standard/3.0/runtimes.yml b/al2/x86_64/standard/3.0/runtimes.yml index 6357b3c8..0a5eef4d 100644 --- a/al2/x86_64/standard/3.0/runtimes.yml +++ b/al2/x86_64/standard/3.0/runtimes.yml @@ -124,3 +124,12 @@ runtimes: 3.1: commands: - echo "Installing .NET version 3.1 ..." + - test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $DOTNET_31_SDK_VERSION + 5.0: + commands: + - echo "Installing .NET version 5.0 ..." + - test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $DOTNET_5_SDK_VERSION + 6.0: + commands: + - echo "Installing .NET version 6.0 ..." + - test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $DOTNET_6_SDK_VERSION \ No newline at end of file