The .NET 8 multi-platform container tags have been updated to be Linux-only. This means that the latest, <major>.<minor>, and <major>.<minor>.<patch> tags are Linux-only going forward.
Previously if we pull a .NET image with a multi-platform tag from a Windows machine, we would get a Windows image (if the tag supports the Windows platform), but not anymore.
For example: if we run the following in a pipeline using windows-latest agent, we will get an error.
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
# ...
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
# ...
If we want to run it on a windows agent, then we need to explicitly update tag usage to indicate which Windows version we're targeting, something like the following.
FROM mcr.microsoft.com/dotnet/aspnet:8.0-nanoserver-ltsc2022 AS base
# ...
FROM mcr.microsoft.com/dotnet/sdk:8.0-nanoserver-ltsc2022 AS build
# ...
We can select a Windows image name based on our requirement: Windows Server Core vs Nanoserver.
Official announcement:
Multi-platform container tags are Linux-only
Hope this helps.
Happy Coding.
Regards,
Jaliya
No comments:
Post a Comment