-
The .NET SDK can build against any runtime the same, or lower, version of the SDK. For example, .NET 8 can build .NET 7 apps. Newer versions of the .NET SDK have build tool improvements (for example, .NET 8 has better support for cross architecture building via docker) However, for So, how do customers use the .NET 8 SDK in a docker image with the .NET 7 runtime installed? Background information: NuGet/Home#12227 (comment) |
Beta Was this translation helpful? Give feedback.
Answered by
mthalman
May 16, 2023
Replies: 2 comments 1 reply
-
You can accomplish this with a one-liner in your Dockerfile: FROM mcr.microsoft.com/dotnet/sdk:8.0-preview
# Import ASP.NET Core runtime and .NET runtime for 7.0
COPY --from=mcr.microsoft.com/dotnet/aspnet:7.0 /usr/share/dotnet/shared /usr/share/dotnet/shared |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
zivkan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can accomplish this with a one-liner in your Dockerfile: