我在配置Registry内部镜像时遇到问题。我总是得到禁止的错误。
当我直接访问网址https://registry-1.docker.io/v2/时,我也有同样的错误:
var thing = new ColoredThing("blue");
var color = thing.color
var isBlue = color.isBlue(); //isBlue == true
thing.color = "red";
isBlue = color.isBlue(); //isBlue == false
config.yml:
{"errors":[{"code":"UNAUTHORIZED","message":"access to the requested resource is not authorized","detail":null}]}
注册表2.0错误:
version: 0.1
log:
fields:
service: registry
storage:
delete:
enabled: true
cache:
blobdescriptor: inmemory
filesystem:
rootdirectory: /var/lib/registry
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
health:
storagedriver:
enabled: true
interval: 10s
threshold: 3
proxy:
remoteurl: https://registry-1.docker.io
有什么想法吗?
谢谢!
答案 0 :(得分:0)
人,
我发现它为什么不起作用:
域registry-1.docker.io作为其他IP地址存在于我的/ etc / hosts文件中,仅用于反向代理。
问题是此反向代理正在请求身份验证。我使用传统的Proxy with HTTP_PROXY变量并且工作。
:d