Skip to content

Failed to pull image use proxy #1193

Closed
Closed

Description

@bhy7

Description

When nerdctl pulls the image through the proxy, It's mention

INFO[0000] trying next host                              error="failed to do request: Head \"https://registry-1.docker.io/v2/library/hello-world/manifests/latest\": proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused" host=registry-1.docker.io
ERRO[0000] server "docker.io" does not seem to support HTTPS  error="failed to resolve reference \"docker.io/library/hello-world:latest\": failed to do request: Head \"https://registry-1.docker.io/v2/library/hello-world/manifests/latest\": proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused"
INFO[0000] Hint: you may want to try --insecure-registry to allow plain HTTP (if you are in a trusted network) 
FATA[0000] failed to resolve reference "docker.io/library/hello-world:latest": failed to do request: Head "https://registry-1.docker.io/v2/library/hello-world/manifests/latest": proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused 

Steps to reproduce the issue

1.Set environment variable:

export http_proxy="socks5://127.0.0.1:7890"
export https_proxy="socks5://127.0.0.1:7890"
export HTTP_PROXY="socks5://127.0.0.1:7890"
export HTTPS_PROXY="socks5://127.0.0.1:7890"
export all_proxy="socks5://127.0.0.1:7890"
export ALL_PROXY="socks5://127.0.0.1:7890"
  1. run nerdctl run hello-world

Describe the results you received and expected

Success pull image

What version of nerdctl are you using?

nerdctl version 0.21.0

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

No response

Host information

Client:
Namespace: default
Debug Mode: false

Server:
Server Version: v1.6.6
Storage Driver: overlayfs
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Log: fluentd journald json-file
Storage: native overlayfs
Security Options:
seccomp
Profile: default
cgroupns
rootless
Kernel Version: 5.18.9-arch1-1
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.51GiB
Name: tonytp
ID: f67a3e9f-5477-4924-8c26-a50b7929d4f0

Activity

  1. Zheaoli commented on Jul 5, 2022

    @Zheaoli
    Member

    the message in your description has some like this proxyconnect tcp: dial tcp 127.0.0.1:7890: connect: connection refused .
    Maybe you need to double-check the proxy setting right or not

  2. added
    question
    area/rootless
    and removed
    kind/unconfirmed-bug-claim
    on Jul 6, 2022
  3. AkihiroSuda commented on Jul 6, 2022

    @AkihiroSuda
    Member

    Rootless has different view of 127.0.0.1.
    Please use non-loopback address or rootful

  4. locked and limited conversation to collaborators on Jul 6, 2022
  5. converted this issue into a discussion #1195 on Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/rootlessquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions