Azure DevOps托管代理无法拉Windows:2004 [英] Azure DevOps hosted-agent failed to pull windows:2004
问题描述
使用 Windows-2019
时
我熟悉
但是,如果我使用托管代理拉出图像 windows:1903
,我将得到错误 windows/amd64没有匹配的清单...
.为了验证我的答案,我使用了私有代理,该私有代理托管在Windows版本 1903
(操作系统内部版本 18362
)上,工作正常.
总而言之,我们无法在托管代理(1809)上提取windows:2004(2004)图像.此请求的解决方法是使用私有代理.
顺便说一句,我已经测试了都无法解决此错误.
参考链接:
When using Windows-2019
hosted agent (Agent installed with 1809 windows version -Microsoft Windows Server 2019 Datacenter) as Agent Specification, We can't pull mcr.microsoft.com/windows:2004
docker image.
Exception:
I'm familiar with this solution (Which works perfectly locally). But, since Docker Desktop doesn't install on the agent I can't switch to Windows containers. Moreover, Install Docker Desktop is not an option since reboot required.
Currently, Creating a build machine is not an option.
So my question is: There is a way to pull mcr.microsoft.com/windows:2004
docker image from the hosted agent?
So my question is: There is a way to pull mcr.microsoft.com/windows:2004 docker image from the hosted agent?
I am afraid there is no such way to pull mcr.microsoft.com/windows:2004
docker image from the hosted agent.
That because Matching container host version with container image versions:
Windows Server containers and the underlying host share a single kernel, the container’s base image must match that of the host. If the versions are different, the container may start, but full functionally isn't guaranteed.
In other words, Windows requires the host OS version to match the container OS version. If you want to run a container based on a newer Windows build, make sure you have an equivalent host build. Otherwise, you can use Hyper-V isolation to run older containers on new host builds.
So, we could not pull the image windows:2004
(2004
) from the hosted agent windows-latest
OR windows-2019
(1809
). We could only pull the image windows:1809
with the hosted agent.
docker pull mcr.microsoft.com/windows/servercore:1809
However, if I pull the image windows:1903
with hosted agent, I will get the error no matching manifest for windows/amd64...
. In order to verify my answer, I use the private agent, which hosted on the windows version 1903
(OS build 18362
), It works fine.
In summary, we cannot pull windows:2004 (2004) image on the hosted agent (1809). The workaround for this request is that use the private agent.
BTW, I have tested those solutions which mentioned in the link in your question with private agent. Neither switch to Linux containers
nor set the "experimental": true
can solve this error.
The Reference links:
List of Microsoft Windows versions
Unable to pull images from microsoft
这篇关于Azure DevOps托管代理无法拉Windows:2004的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!