You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When accessing a container image registry using go-containerregistry, I notice different behavior when using a domain name versus an IP address.
When using a domain name like registry.example.com, the client first tries to connect over HTTPS on port 443. If this is rejected, the client exits with an error.
However, when using an IP address like 10.0.0.1, it also first tries HTTPS and port 443. But if that is rejected, it then tries a second attempt over HTTP on port 80. This succeeds and the connection is established.
Why does the client try falling back to HTTP when an IP address is used, but it does not make a second attempt for a domain name?
Is there a way I can manually configure the go-containerregistry client to use HTTP when accessing a registry, instead of relying on the automatic HTTPS fallback behavior?
At the same time, I also noticed that my registry does not seem to support https access.
If I use docker pull to pull the image, it will fail and the error message is:
Error response from daemon: Get "https://10.xx.xx.198/v2/": dial tcp 10.xx.xx.198:443: connect: connection refused
If I modify "insecure-registries" in /etc/docker/daemon.json, for example
"insecure-registries" : [
"registry.storm.io"
]
docker pull pulls the image successfully.
The text was updated successfully, but these errors were encountered:
When accessing a container image registry using go-containerregistry, I notice different behavior when using a domain name versus an IP address.
When using a domain name like registry.example.com, the client first tries to connect over HTTPS on port 443. If this is rejected, the client exits with an error.
However, when using an IP address like 10.0.0.1, it also first tries HTTPS and port 443. But if that is rejected, it then tries a second attempt over HTTP on port 80. This succeeds and the connection is established.
Why does the client try falling back to HTTP when an IP address is used, but it does not make a second attempt for a domain name?
Is there a way I can manually configure the go-containerregistry client to use HTTP when accessing a registry, instead of relying on the automatic HTTPS fallback behavior?
At the same time, I also noticed that my registry does not seem to support https access.
If I use
docker pull
to pull the image, it will fail and the error message is:If I modify
"insecure-registries"
in/etc/docker/daemon.json
, for exampledocker pull pulls the image successfully.
The text was updated successfully, but these errors were encountered: