Http docker如何获得200而不是401的返回码
工作时docker无法提取图像:Http docker如何获得200而不是401的返回码,http,go,docker,Http,Go,Docker,工作时docker无法提取图像: [b209d3c5] +job pull(ubuntu, ) [debug] registry.go:372 [registry] Calling GET https://index.docker.io/v1/repositories/ubuntu/images [debug] http.go:160 https://index.docker.io/v1/repositories/ubuntu/images -- HEADERS: map[User-Agent:
[b209d3c5] +job pull(ubuntu, )
[debug] registry.go:372 [registry] Calling GET https://index.docker.io/v1/repositories/ubuntu/images
[debug] http.go:160 https://index.docker.io/v1/repositories/ubuntu/images -- HEADERS: map[User-Agent:[docker/1.0.0 go/go1.2.2 git-commit/63fe64c kernel/3.15.1-1-ARCH os/linux arch/amd64]]
[debug] server.go:1182 Retrieving the tag list
[debug] http.go:160 https://cdn-registry-1.docker.io/v1/repositories/library/ubuntu/tags -- HEADERS: map[User-Agent:[docker/1.0.0 go/go1.2.2 git-commit/63fe64c kernel/3.15.1-1-ARCH os/linux arch/amd64]]
[debug] registry.go:327 Got status code 401 from https://cdn-registry-1.docker.io/v1/repositories/library/ubuntu/tags
[error] server.go:1185 Could not reach any registry endpoint
Could not reach any registry endpoint
[b209d3c5] -job pull(ubuntu, ) = ERR (1)
如果我手动尝试访问第二个URL,它也会可靠地生成401
但是,在家中,相同的命令以某种方式成功地检索到标记:
[4e9acee4] +job pull(ubuntu, )
[debug] registry.go:372 [registry] Calling GET https://index.docker.io/v1/repositories/ubuntu/images
[debug] http.go:160 https://index.docker.io/v1/repositories/ubuntu/images -- HEADERS: map[User-Agent:[docker/1.0.0 go/go1.2.2 git-commit/63fe64c kernel/3.14.6-1-ARCH os/linux arch/amd64]]
[debug] server.go:1182 Retrieving the tag list
[debug] http.go:160 https://cdn-registry-1.docker.io/v1/repositories/library/ubuntu/tags -- HEADERS: map[User-Agent:[docker/1.0.0 go/go1.2.2 git-commit/63fe64c kernel/3.14.6-1-ARCH os/linux arch/amd64]]
[debug] registry.go:327 Got status code 200 from https://cdn-registry-1.docker.io/v1/repositories/library/ubuntu/tags
[debug] server.go:1197 Registering tags
[...]
问题是:这个docker实例是如何获得200个结果的
是否有一个好的方法来检查通信?(Wireshark可能不好,因为https是完全加密的。)
也许唯一的办法就是读报纸。但我对围棋语言了解不多
您能想出更好的解决方案吗,我自己构建docker并添加一些调试打印?似乎REST调用是一个有效的授权:令牌…
头。公司代理似乎也打破了这个标题(
从源代码构建docker真的很轻松。对于这种REST接口也有一个简单的定义,但它没有指定更多的要求。