Skip to content
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@shantanoo-desai
Comment options

@richlander
Comment options

Answer selected by shantanoo-desai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants