简体   繁体   English

docker 拉动工件和微软的问题

[英]docker pull issue with artifactory and microsoft

I have a strange problem with docker and pulling microsoft images.我对 docker 和拉取微软图像有一个奇怪的问题。

Used command docker pull mcr.microsoft.com/dotnet/sdk:6.0使用命令docker pull mcr.microsoft.com/dotnet/sdk:6.0

  • Server 1: no issue服务器1:没问题
  • Server 2: Error response from daemon: Get "https://mcr.microsoft.com/v2/": dial tcp 13.69.64.80:443: connect: connection refused服务器 2:来自守护程序的错误响应:获取“https://mcr.microsoft.com/v2/”:拨打 tcp 13.69.64.80:443:连接:连接被拒绝

Both servers are两台服务器都是

  • behind the firewall在防火墙后面
  • configured with same /etc/docker/daemon.json whicht points to the internal artifactory instance配置有相同的 /etc/docker/daemon.json 指向内部工件实例
  • commands like docker pull sonarsource/sonar-scanner-cli works on both servers without an issuedocker pull sonarsource/sonar-scanner-cli这样的命令在两台服务器上都可以正常工作
  • also pulling privat images from artifactory works on both servers还从两台服务器上的人工制品中提取私有图像

any idea on that behavior?对这种行为有任何想法吗?

Is your remote repo proxying mcr.microsoft.com and is configured to cache foreign layers?您的远程存储库是否代理mcr.microsoft.com并配置为缓存外部层?

If there is a local image, when the docker client builds the image and publishes it to Artifactory, Artifactory gets the manifest but has reference to foreign layers which are remote, so Artifactory is not going out and fetch them in a local repository.如果有本地镜像,当 docker 客户端构建镜像并将其发布到 Artifactory 时,Artifactory 获取清单但引用了远程的外部层,因此 Artifactory 不会外出并在本地存储库中获取它们。 This behavior we observed appears to be related to this RTFACT-22938 Jira.我们观察到的这种行为似乎与这个RTFACT-22938 Jira 有关。 If the foreign layers from the base image are not cached locally, Artifactory will not fetch these layers.如果基础图像中的外部图层未在本地缓存,Artifactory 将不会获取这些图层。 In order for Artifactory to retrieve the foreign layers as well, all of the base image's layers need to be cached in Artifactory.为了让 Artifactory 也能检索到外部图层,所有基础图像的图层都需要缓存在 Artifactory 中。

Since Microsoft changes the tags of the images constantly, and the manifest is changing, the layers that were pulled will not be used since they are no longer referenced in the manifest.由于 Microsoft 不断更改图像的标签,并且清单也在更改,因此被拉出的层将不会被使用,因为它们不再在清单中引用。 Re-tagging the images with custom tags can be one way to avoid this situation.使用自定义标签重新标记图像可能是避免这种情况的一种方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM