AppVeyor 上 Aspnet 图像的 OSversion 和其他属性不匹配

问题描述

我面临一个非常奇怪的问题。我将 appveyor 用于 CI/CD,显然 mcr.microsoft.com/dotnet/framework/aspnet:4.8 映像的操作系统版本在 appveyor 服务器和我的系统上有所不同。 这是我在 appveyor 上检查图像时得到的

"Architecture": "amd64","Os": "windows","Osversion": "10.0.17763.1637","Size": 8424507509,"VirtualSize": 8424507509,"GraphDriver": {
            "Data": {
                "dir": "C:\\ProgramData\\Docker\\windowsfilter\\299141c3a9068896ce9f5928d7b9174570a2ef0b5f59a9b45ca0d768c3a09206"
            },"Name": "windowsfilter"
        },

与此相比,这是我系统上的内容

"Architecture": "amd64","Osversion": "10.0.19041.685","Size": 5541468778,"VirtualSize": 5541468778,"GraphDriver": {
            "Data": {
                "dir": "C:\\ProgramData\\Docker\\windowsfilter\\c9c52e1316159499618a9c15b326fdc7457db4f4de07af590039086de5bc82e0"
            },

操作系统版本和其他属性之间存在差异。所以我尝试在digest的基础上再次拉取图像

docker pull mcr.microsoft.com/dotnet/framework/aspnet@sha256:d7adec80a9a43d801891458040018972ac006aeca2903cdc6369f69f54951b22

但没有任何更新。 这导致的问题是我的自定义映像构建在具有 Osversion "Osversion": "10.0.19041.685" 的系统上。 appveyor 使用此图像来构建我的最终图像,正如预期的那样,这会引发错误,如 Microsoft Container Versions 中所述。

谁能帮我理解为什么会这样。谢谢!

解决方法

AppVeyor 映像基于 Windows Server 2019,因此 10.0.17763 是可以在 AppVeyor 上运行的最新版本的基础映像。您使用的是 Windows 10 版本 2004,即内部版本 10.0.19041。