docker - Artifactory 不会拉动 Windows 图像的某些层

标签 docker artifactory

我想对离线客户端使用artifactory。 我已经安装了ws2016和docker。 我这台机器上没有代理。

当我尝试拉取镜像时 - docker 开始下载(例如 iis:nanoserver)除两层之外的所有层。客户端尝试直接从互联网下载它们。我找到了原因 - 因为 list 中有指向 Microsoft 或 list 中其他资源的强 URL) 解决这个问题的办法是什么?

PS C:\Windows\system32> docker -l debug pull docker.artifactory.mydomain.com/microsoft/aci-helloworld:windows
windows: Pulling from microsoft/aci-helloworld
bce2fbc256ea: Retrying in 1 second
4a8c367fd46d: Retrying in 1 second
a8a90ba3a09e: Download complete
f694b71407bb: Download complete
1297730844f7: Download complete
757c0e11bc6f: Download complete
23daf900b85b: Download complete
4c4e4246add8: Download complete
739a2e484f2e: Download complete
726e0a195fd7: Download complete
8f617470c3a5: Download complete
1504687851f5: Download complete
dial tcp 23.64.230.126:443: connectex: No connection could be made because the target machine actively refused it.

docker 版本

Client:
 Version:      17.03.1-ee-3
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   3fcee33
 Built:        Thu Mar 30 19:31:22 2017
 OS/Arch:      windows/amd64

Server:
 Version:      17.03.1-ee-3
 API version:  1.27 (minimum version 1.24)
 Go version:   go1.7.5
 Git commit:   3fcee33
 Built:        Thu Mar 30 19:31:22 2017
 OS/Arch:      windows/amd64
 Experimental: false

list .json

"layers": [
      {
         "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip",
         "size": 252691002,
         "digest": "sha256:bce2fbc256ea437a87dadac2f69aabd25bed4f56255549090056c1131fad0277",
         "urls": [
            "https://go.microsoft.com/fwlink/?linkid=837858"
         ]
      },
      {
         "mediaType": "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip",
         "size": 141758132,
         "digest": "sha256:b0b5e40cb939a7befa4e01212d6f65f30022bbd04b5f15985b45ce9cfd3fcabc",
         "urls": [
            "https://go.microsoft.com/fwlink/?linkid=860052"
         ]

最佳答案

使用 docker 17.6 找到官方解决方案

编辑 daemon.json 文件添加以下行:

{
  "allow-nondistributable-artifacts": ["myregistrydomain.com:5000"]
}

当您将镜像推送到列表中的注册表时,它们的不可分发层将被推送到注册表。

关于docker - Artifactory 不会拉动 Windows 图像的某些层,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47172999/

相关文章:

docker - COPY失败:stat/var/lib/docker/tmp/docker-builderXXXXX/default.conf:没有这样的文件或目录

php - Nginx + php-fpm : Bad gateway only when xdebug server is running

jenkins - gradle artifactory 发布 : jenkins pipeline does not publish properties

java - maven 构建仅在 Jenkins 中失败- Artifact {null :null:null:jar}: The groupId cannot be empty

c# - 错误 406 Not Acceptable JSON

docker - 如何在 Docker Compose 中让容器等待其他容器

docker - 使用 docker 命令创建文件并提交更改后无法查看文件

docker - 如何缩小 Docker 磁盘镜像,但在 Docker for Mac 中保留卷?

nuget - nuget 存储库中的 Artifactory 最大唯一快照

apache - Apache 背后的 Artifactory 使用基本身份验证和匿名浏览