且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将默认Docker注册表从docker.io更改为我的私有注册表?

更新时间:2023-01-12 11:46:20

更新:发表您的评论后,当前无法更改默认注册表,请参见此问题有关更多信息。

UPDATE: Following your comment, it is not currently possible to change the default registry, see this issue for more info.

您应该能够做到这一点,将主机和端口替换为自己的主机:

You should be able to do this, substituting the host and port to your own:

docker pull localhost:5000/registry-demo

如果服务器是远程服务器/具有身份验证,您可能需要使用以下命令登录服务器:

If the server is remote/has auth you may need to log into the server with:

docker login https://<YOUR-DOMAIN>:8080

然后运行:

docker pull <YOUR-DOMAIN>:8080/test-image