我指的是此链接-Docker pull

默认情况下,docker pull从Docker Hub(https://hub.docker.com)中提取图像。



我想知道此链接在我们的本地计算机设置中的何处配置。
我正在Windows 10上使用Docker。

请您参考如下方法:

您无法更改Docker镜像的默认域。这是by design:

Your Docker installation with this "private registry defined in the config file" would be incompatible with every other Docker installation out there. Running docker pull debian needs to pull from the same place on every Docker install.

A developer using Docker on their box will use debian, centos and ubuntu official images. Your hacked up Docker install would just serve your own versions of those images (if they're present) and this will break things.



您应该通过完整的网址来标识您的图片:
<your-private-registry>/<repository>/<image>:<tag>
默认域 docker.io(“docker hub”)在docker的代码中为 硬编码的
例如这里:

https://github.com/docker/distribution/blob/master/reference/normalize.go

检查函数 splitDockerDomain,如果用户未提供该功能,它将 docker.io设置为注册表。


评论关闭
IT序号网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!