containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
7.98k stars 594 forks source link

nerdctl can't pull images under rootless (`dial tcp 127.0.0.1:7890: connect: connection refused`) #3080

Closed cyxinda closed 3 months ago

cyxinda commented 3 months ago

Description

nerdctl can't pull images under rootless using the network proxy .

 cyxinda@oldsix  ~/download  nerdctl pull centos
docker.io/library/centos:latest:                                                  resolved       |++++++++++++++++++++++++++++++++++++++| 
index-sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177:    done           |++++++++++++++++++++++++++++++++++++++| 
manifest-sha256:a1801b843b1bfaf77c501e7a6d3f709401a1e0c83863037fa3aab063a7fdb9dc: done           |++++++++++++++++++++++++++++++++++++++| 
config-sha256:5d0da3dc976460b72c77d94c8a1ad043720b0416bfc16c52c45d4847e53fadb6:   done           |++++++++++++++++++++++++++++++++++++++| 
elapsed: 4.8 s                                                                    total:  762.0  (158.0 B/s)                                       
ERRO[0004] server "docker.io" does not seem to support HTTPS  error="failed to copy: httpReadSeeker: failed open: failed to do request: Get \"https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/5d/5d0da3dc976460b72c77d94c8a1ad043720b0416bfc16c52c45d4847e53fadb6/data?verify=1718103351-iLuqC1ybVjXQxIgcPAo9g6KWE8g%3D\": proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused"
INFO[0004] Hint: you may want to try --insecure-registry to allow plain HTTP (if you are in a trusted network) 
FATA[0004] failed to copy: httpReadSeeker: failed open: failed to do request: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/5d/5d0da3dc976460b72c77d94c8a1ad043720b0416bfc16c52c45d4847e53fadb6/data?verify=1718103351-iLuqC1ybVjXQxIgcPAo9g6KWE8g%3D": proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused 
 ✘ cyxinda@oldsix  ~/download  

Under the root account, the function of using the network proxy to pull the image is OK.

Steps to reproduce the issue

1. 2. 3.

Describe the results you received and expected

nerdctl can pull images under rootless .

What version of nerdctl are you using?

cyxinda@oldsix  ~/download  nerdctl --version
nerdctl version 1.7.5

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

AkihiroSuda commented 3 months ago

Please try nerdctl v2 beta. V1 has a different view of localhost

cyxinda commented 3 months ago

Please try nerdctl v2 beta. V1 has a different view of localhost

thank you. According to your suggest,the problem have been resolved.