-
I look on page https://hub.docker.com/_/microsoft-dotnet-framework-sdk/ I see that Windows Server Core 2022 build has tags As many versions have the same tag, I am confused, about what version will be used, when I will write:
? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
It depends on your Windows (Client or Server) version. I am not sure if that is documented anywhere. You can pull the image and then check which Windows Server Core version you pulled. Does that work? |
Beta Was this translation helpful? Give feedback.
-
I have Windows 10 21H1 locally, I pull Then I repeat the same in Github actions using @richlander Should I get different versions? |
Beta Was this translation helpful? Give feedback.
-
The If we take a look at manifest list, we can see what we're dealing with: C:\> docker manifest inspect mcr.microsoft.com/dotnet/framework/sdk:4.8
{
"schemaVersion": 2,
"mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
"manifests": [
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 3206,
"digest": "sha256:fb80acb2729830be7b7e7f2a9be061a9ffa72f33a2fbe9fc75aed84f46857088",
"platform": {
"architecture": "amd64",
"os": "windows",
"os.version": "10.0.14393.5192"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2788,
"digest": "sha256:82e0a5e2c8747b9f2c88a15e7f652fd4b437cbe0399ab15ac54a0680dde8b453",
"platform": {
"architecture": "amd64",
"os": "windows",
"os.version": "10.0.17763.3046"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2580,
"digest": "sha256:e93be4dcc24e1327ec07e843c5b391e7c84dc9897b2deebb813b06f3547c0745",
"platform": {
"architecture": "amd64",
"os": "windows",
"os.version": "10.0.19042.1766"
}
},
{
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"size": 2579,
"digest": "sha256:6c490f4528cb625c60aa119669830639ae3988c3c23dfb2f94a4ef19df2eb606",
"platform": {
"architecture": "amd64",
"os": "windows",
"os.version": "10.0.20348.768"
}
}
]
} That metadata provides a mapping between image digests and Windows version. So there's a registration for digest Windows desktop versions are more problematic now that Windows Server has moved to releasing Windows Server versions only for LTSC (long term support channel) versions and not SAC (semi-annual channel). This means your Windows 10 21H1 (version 10.0.19043) machine doesn't have a matching Windows Server container version. This is true for all of Windows Server containers, not specifically .NET Framework containers. Because no match is found, it falls back to the first version in the manifest list, version 10.0.14393.5192, which is Windows Server 2016. If you want to be explicit about which version you get on your desktop machine, you'd need to use a tag which specifies the Windows version. For example, if you want the Windows Server 2022 image, you'd need to use the One trick you could do with your Dockerfile is to make use of an ARG NET_FX_TAG=4.8
FROM mcr.microsoft.com/dotnet/framework/sdk:$NET_FX_TAG To use this from the command line you would use the Side note regarding the digest you had provided: Digest |
Beta Was this translation helpful? Give feedback.
-
Thank you! That is a very good explanation! Is there any quick way to compare configurations for different platforms? I had an issue with differences in the default shell on
And for But I am not even able to run locally |
Beta Was this translation helpful? Give feedback.
The
4.8
is a manifest list (multi-platform) tag. Docker will automatically resolve that tag to an actual image based on rules governed by the metadata of the manifest list. For Windows, those rules make use of the Windows version. It will attempt to find an image that matches the Windows version of the host.If we take a look at manifest list, we can see what we're dealing with: