Docker:禁用从远程registry中拉出

当我输错的东西,它试图在中央registry中search。 如何完全禁用它?

有没有一个选项来清除该url?

如果你从centos extras中使用rpms的红帽克隆,他们有一个参数来做到这一点:

--block-registry hostname 

这是一个RedHat扩展(见这里 ),我不认为这是上游(考虑到13450 )

作为参考,现在(docker 1.9,2015年11月):

  • pull.go寻找拉端点:

     s.registryService.LookupPullEndpoints() 
  • registry/service.go查找V2端点:

     s.lookupEndpoints(repoName) 
  • registry/service_v2.go追加DefaultV2Registry

     endpoints = append(endpoints, APIEndpoint{ URL: DefaultV2Registry, 
  • registry/config_unix.go包括DefaultV2Registry

     DefaultV2Registry = "https://registry-1.docker.io" 

因此,除非有一个选项查找该端点,否则docker pull仍然会包含该中央默认V2registry。