目录

docker-Error-response-from-daemon-Get-httpsregistry-1.docker.iov2-的问题处理

docker Error response from daemon: Get “https://registry-1.docker.io/v2/ 的问题处理

docker Error response from daemon: Get “ 的问题处理

最近pull 数据 发现 docker 有如下错误



报错问题

Using default tag: latest

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)

https://i-blog.csdnimg.cn/direct/f9e627b8975b4f22911c180fc3d32c42.png

检查网络连接

这个错误可能是由于网络连接问题导致的,比如无法访问 。请确保您的网络连接正常,并且防火墙或代理设置没有阻止 Docker。

如果您在公司网络中并且使用代理,您可能需要配置 Docker 以支持代理设置。可以通过编辑 /etc/systemd/system/docker.service.d/http-proxy.conf 文件来配置。

解决方案,配置镜像源

第一步

https://i-blog.csdnimg.cn/direct/4cfa985e970f4b0f96b21b437b6af105.png

第2步

https://i-blog.csdnimg.cn/direct/1ec8eae013da4adc984700f76a90c9c0.png

{
  "builder": {
    "gc": {
      "defaultKeepStorage": "20GB",
      "enabled": true
    }
  },
  "experimental": false,
  "registry-mirrors": [
    "https://docker.m.daocloud.io",
    "https://docker.1panel.live",
    "https://hub.rat.dev"
  ]
}

您提供的配置是与 Docker 或类似的容器系统相关的设置。以下是这些设置的中文解释:

gc(垃圾回收):

defaultKeepStorage 设置为 20GB,表示在进行垃圾回收时,Docker 会保留最多 20GB 的数据。

enabled 设置为 true,表示启用垃圾回收功能。

experimental 设置为 false,表示禁用了 Docker 的实验性功能。

registry-mirrors 列出了几个自定义的 Docker 镜像源:

这些镜像源可以加速 Docker 镜像的拉取,因为它们可能在某些网络或地区上更接近或经过优化

完成docker pull postgres

https://i-blog.csdnimg.cn/direct/bf798116737d4a2ab075474e56a421ce.png