Can’t reach registry-1.docker.io

[+] Running 1/1
 ✘ portainer Error Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)                         63.1s
Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)


[+] Running 1/1
 ✘ portainer Error Get "https://registry-1.docker.io/v2/": context deadline exceeded                                                                                                        66.1s
Error response from daemon: Get "https://registry-1.docker.io/v2/": context deadline exceeded

And does curl works?

curl -s -vvv https://registry-1.docker.io/v2/

Also we usually need the following information to understand the issue:

  1. What platform are you using? Windows, Linux or macOS? Which version of the operating systems? In case of Linux, which distribution?

  2. How did you install Docker? Sharing the platform almost answers it, but only almost. Direct links to the followed guide can be useful.

  3. On debian based Linux, the following commands can give us some idea and recognize incorrectly installed Docker:

    docker info
    docker version
    

    Review the output before sharing and remove confidential data if any appears (public IP for example)

    dpkg -l 'docker*' | grep '^ii'
    snap list docker
    

    When you share the outputs, always format your posts according to the following guide: How to format your forum posts