nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

Option --insecure-registry does not work with pull & push (`no route to host`)

Open Teo90 opened this issue 5 years ago • 7 comments

Hi,

I'm trying to use nerdctl with a private harbor without TLS, while the global flag --insecure-registry does not really ignore the HTTP responses.

Here is what i didi: pull nerdctl --insecure-registry pull 192.168.88.150/devops/kaniko-project-executor:debug image

push nerdctl -n k8s.io --insecure-registry push 192.168.88.150/k8s/coredns:v1.8.0 image

Teo90 avatar Jul 22 '21 09:07 Teo90

The no route to host error does not seem to be related to nerdctl. Can you ping 192.168.88.150?

AkihiroSuda avatar Jul 23 '21 05:07 AkihiroSuda

Sure, because crictl succeeded in pulling harbor http protocol image

Teo90 avatar Jul 27 '21 07:07 Teo90

nerdctl added port 80 to pulling successfully

image

But push still fails!

Teo90 avatar Jul 27 '21 07:07 Teo90

cc @ktock @fahedouch

AkihiroSuda avatar Jul 28 '21 10:07 AkihiroSuda

I agree with @AkihiroSuda . It looks like a network issue. Did you tried crictl from same network as nerdctl ?

fahedouch avatar Jul 29 '21 15:07 fahedouch

@Teo90 your registry firewall rules should authorize port 443. check if your registry firewall is blocking connection on port 443

fahedouch avatar Jul 30 '21 04:07 fahedouch

This is still an issue, it doesn't care about the --insecure-flag at all.

nerdctl --version
nerdctl version 2.2.0

sudo nerdctl images
REPOSITORY                                                                             TAG                       IMAGE ID        CREATED               PLATFORM       SIZE       BLOB SIZE
192.168.10.6/vtdx/drs-simulator-wrapper                                                latest                    bdfbab865dda    About a minute ago    linux/amd64    1.743GB    583.3MB
sudo nerdctl push --insecure-registry 192.168.10.6/vtdx/drs-simulator-wrapper
INFO[0000] pushing as a reduced-platform image (application/vnd.docker.distribution.manifest.v2+json, sha256:bdfbab865dda50c953961d308aed2dbc2e7a5dfc885966e346c55b19edec04f0)
WARN[0000] skipping verifying HTTPS certs for "192.168.10.6"
manifest-sha256:bdfbab865dda50c953961d308aed2dbc2e7a5dfc885966e346c55b19edec04f0: waiting        |--------------------------------------|
layer-sha256:37f66026d7d43d6b11d810ca42e7c6c5557c49ed28d8e26704a413c14eed927d:    waiting        |--------------------------------------|
layer-sha256:2105c193b88a78a2f21c8f9c00403a135ac9e8b26c605aad0e7de7ac9c1914e6:    waiting        |--------------------------------------|
layer-sha256:a59b1d2d09f8b25aba124ce4ab6d8396abd5a112814d5d676929135ac2a0cc16:    waiting        |--------------------------------------|
elapsed: 30.1s                                                                    total:   0.0 B (0.0 B/s)
FATA[0030] failed to do request: Head "https://192.168.10.6/v2/vtdx/drs-simulator-wrapper/blobs/sha256:965d8093f7b15f5cd6d30a9dee1a53b94f96c19c2eab7efa745882a5d1d78a5b": dial tcp 192.168.10.6:443: i/o timeout
curl http://192.168.10.6/v2/_catalog
{"repositories":[]}

beckend avatar Nov 13 '25 07:11 beckend