2014-06-21 32 views
1

在工作泊塢窗返回代碼是不是能夠拉動圖片:如何搬運工人設法得到的200,而不是401

[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 
[...] 

的問題是:這個搬運工實例是怎麼得到200結果呢?

是否有檢查通信的好方法? (Wireshark可能不如https完全加密。)

可能唯一的辦法就是讀source code。但我對走的語言不太瞭解。

你能想到任何更好的解決方案,建立自己的docker並添加一些調試打印?

+0

還有一個[文檔】(http://docker.readthedocs.org/en/v0.5.3/api/registry_index_spec/#tags-registry)對於那種REST接口,但它沒有指定更多的要求。 – michas

回答

1

看起來像那個REST電話requires有效的Authorization: Token ...標題。也似乎公司代理打破了這個標題。 :(從源

建築搬運工是真的無痛的。