Docker如何在没有HTTP API的情况下与registry通信

https://docs.docker.com/registry/spec/api/我们知道,Docker守护程序通过HTTP API与Docker registries通信。但是,像m.docker-registry.ir这样的一些registries没有实现HTTP API,如"curl m.docker-registry.ir/v2/"返回以下响应:

<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>openresty</center>
</body>
</html>

但是可以用"docker pull m.docker-registry.ir/nginx/nginx"命令拉取镜像。那么在没有HTTP API的情况下它是如何工作的?

原文链接 https://stackoverflow.com/questions/70445686

点赞
stackoverflow用户1156199
stackoverflow用户1156199

这不是错误消息:它是301重定向,并且客户端将跟随重定向。

尝试使用mitmproxy跟踪流程,它将为您提供有关容器注册表工作的内部信息。

2021-12-22 11:09:34