我想在离线客户端使用artifactory。 我安装了ws2016和docker。 我在这台机器上没有代理。
当我试图拉图像时 - docker开始下载(例如iis:nanoserver)除了两个以外的所有图层。客户试图直接从互联网下载它们。我找到了原因 - 因为在清单中有明显强大的URL到Microsoft或其他资源) 这将是什么解决方案?
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 version
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
的manifest.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"
]
答案 0 :(得分:2)
找到docker 17.6的官方解决方案
编辑daemon.json文件添加以下行:
{
"allow-nondistributable-artifacts": ["myregistrydomain.com:5000"]
}
当您将图像推送到列表中的注册表时,它们的不可分发图层将被推送到注册表。
答案 1 :(得分:0)
大多数本地主机只是您的公共或私有IP
点击“应用并重新启动”