Error response from daemon: Get “https://192.168.1.6/v2/“: net/http: request canceled while waiting

Problem scenario:

The following error occurs when docker login and docker push private warehouse:

Error response from daemon: Get "https://192.168.1.6/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Problem Description

Error response from daemon: Get "https://192.168.1.6/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Cause Analysis:

When using a private Harbor repository, the meaning of the insecure-registries configuration item is to allow Docker to use an insecure HTTP connection to access the Harbor repository. Harbor is an open source enterprise-level image warehouse management system that supports secure image transmission through HTTPS. However, there are situations where you may need to use an unsecured HTTP connection to access a private Harbor repository, such as when conducting temporary testing or development in a local environment.

By configuring insecure-registries, you can add the address of the Harbor repository to the configuration item to specify that Docker is allowed to use HTTP connections to access the Harbor repository. This allows Docker to communicate with Harbor via the insecure HTTP protocol without using the secure HTTPS protocol.


solution:

Open docker desktop -> settings -> Docker Engine

Note that if there is a port, you need to add the port (for example: "http://192.168.1.6:5000").

,
  "insecure-registries": [
    "http://192.168.1.6"
  ]

Guess you like

Origin blog.csdn.net/wangxudongx/article/details/131981966