Saturday, March 12, 2022

Azure App Service Supports Windows Containers up to Windows Server Core 2019 and Nano Server 1809

Did you know that as of today, Windows Containers on Azure App Service only supports up to Windows Server Core 2019 and Nano Server 1809?

We were having a Windows Container App running on Azure App Service and recently our deployments started failing with the error" UnsupportedMediaType - The parameter WindowsFxVersion has an invalid value. Cannot run the specified image as a Windows Containers Web App. App Service supports Windows Containers up to Windows Server Core 2019 and Nanoserver 1809. Platform of the specified image: windows, Version: 10.0.20348.587; (CODE: 415)".

Our docker image was based on mcr.microsoft.com/dotnet/aspnet:6.0. Upon inspecting mcr.microsoft.com/dotnet/aspnet:6.0, it's now using Windows OS: 10.0.20348.587 (when it's built on Windows). The change was made on 2022-03-08, likely with the announcement of .NET 6.0.3.

{
    "RepoTags": [
        "mcr.microsoft.com/dotnet/aspnet:6.0"
    ],
    "Created""2022-03-08T18:56:16.0190214Z",
    "Os""windows",
    "OsVersion""10.0.20348.587",
    "..."
}

So to get the things back to work, I had to change the base image to mcr.microsoft.com/dotnet/aspnet:6.0.3-nanoserver-1809 which will enforce underline OS to be Nano Server 1809

While we are here, it's worth specifying the difference between Nano Server and Server Core, so you can choose an appropriate base image that works for you.

  • Nano Server is an ultralight Windows offering for new application development.
  • Server Core is medium in size and a good option for "lifting and shifting" Windows Server apps.

It's always a good practice to be explicit and knowingly update as we go rather than using generic mcr.microsoft.com/dotnet/aspnet:6.0 as Microsoft can update the underline OS anytime.

Hope this helps.

Happy Coding.

Regards,
Jaliya

No comments:

Post a Comment