how docker contact with registries without http api

90 views Asked by At

from https://docs.docker.com/registry/spec/api/ we know that docker daemon contact with docker registries through HTTP APIs. but some registries like m.docker-registry.ir didn't implement HTTP API, as "curl m.docker-registry.ir/v2/" return below response:

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

but images can be pulled with the "docker pull m.docker-registry.ir/nginx/nginx" commands. so without HTTP API how it works?

1

There are 1 answers

0
Vad1mo On

This isn't an error message: it's 301 redirect and the client will follow the redirect.

try using mitmproxy to trace the flow it will provide you with quite an inside on ho container registries are working.