'Docker Image for Dotnet Core 2.2 seems to not exist in new repo

In visual Studio 2017, if you do a 'Add>Add Docker support' to a project, you get the old Repo: microsoft/dotnet:2.2-aspnetcore-runtime location.

I figured, that must be now: FROM mcr.microsoft.com/dotnet/core/runtime:2.2 AS base

And: FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build

Doing that, allows it to build OK, however, when I run it to my utter amazement, I get:

It was not possible to find any compatible framework version
The specified framework 'Microsoft.AspNetCore.App', version '2.2.0' was not found.
  - Check application dependencies and target a framework version installed at:
      /usr/share/dotnet/
  - Installing .NET Core prerequisites might help resolve this problem:
      https://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409
  - The .NET Core framework and SDK can be installed from:
      https://aka.ms/dotnet-download

In the error log for the image when I try to run it..

Which implies that I shouldn't be using mcr.microsoft.com/dotnet/core/runtime:2.2 Because it doesn't include the DotNet Core 2.2 runtime! If not, they sure named it poorly!

Also, I just updated Visual Studio 2017, and it still generates a bogus Docker file that won't work, clearly, that needs fixed.

What is the correct Image for Dotnet Core 2.2?

It shouldn't matter, but I'm running this under Kubernetes / Docker Desktop

(Also, if I change the runtime to use the full version that I did the build on, it works! I just tried this after I wrote this...)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source