Query regarding potential introduction of lower versioned frameworks in dotnet runtime containers #3875
-
Query Description
CaveatThere are certain TrialMy current FROM mcr.microsoft.com/dotnet/aspnet:6.0-focal
RUN mkdir -p /usr/share/App/icon.NExT
COPY ./sku.key /usr/share/App/icon.NExT/
COPY ./appsettings.json /icon/DeployServer-Files/
WORKDIR /icon
COPY ./* /icon/DeployServer-Files/
CMD [ "dotnet", "DeployServer-Files/DeployServer.dll" ] which brings up the server based on some Kestrel configuration I provide in the
I understand the distinction of having separation of different runtimes/frameworks/sdks but would there be some form of documentation as to provide lower versioned framework/sdk into the current runtime? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Here's an easy pattern to copy other runtimes into your container image. https://github.com/octokit/octokit.net/blob/main/.devcontainer/Dockerfile#L8-L9 That example is copying the SDK. You don't want that. You'd want: COPY --from=mcr.microsoft.com/dotnet/aspnet:5.0-focal /usr/share/dotnet/shared /usr/share/dotnet/shared I switch to pulling Ubuntu 20.04. This way, you only pull the OS once. .NET 5 is now out of support, however. |
Beta Was this translation helpful? Give feedback.
Here's an easy pattern to copy other runtimes into your container image.
https://github.com/octokit/octokit.net/blob/main/.devcontainer/Dockerfile#L8-L9
That example is copying the SDK. You don't want that. You'd want:
COPY --from=mcr.microsoft.com/dotnet/aspnet:5.0-focal /usr/share/dotnet/shared /usr/share/dotnet/shared
I switch to pulling Ubuntu 20.04. This way, you only pull the OS once.
.NET 5 is now out of support, however.