ubuntu docker pull 失败 Error response from daemon: Get https://registry-1.docker.io/v2/
2022/4/15 7:14:10
本文主要是介绍ubuntu docker pull 失败 Error response from daemon: Get https://registry-1.docker.io/v2/,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!
问题:
ubuntu@VM-3-4-ubuntu:~$ docker pull tensorflow/tensorflow:2.3.4-gpu
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)
方案1 ---最后生效了,因为用的腾讯云的服务器,之前添加的都没用,直到添加了腾讯云镜像地址。。。
修改/etc/docker/daemon.json文件,并重启docker服务
{ "registry-mirrors": ["https://registry.docker-cn.com","http://hub-mirror.c.163.com","https://mirror.ccs.tencentyun.com"] }
ubuntu@VM-3-4-ubuntu:/etc/docker$ docker info Client: Context: default Debug Mode: false Plugins: app: Docker App (Docker Inc., v0.9.1-beta3) buildx: Docker Buildx (Docker Inc., v0.8.1-docker) scan: Docker Scan (Docker Inc., v0.17.0) Server: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 20.10.14 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 1 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc Default Runtime: runc Init Binary: docker-init containerd version: 3df54a852345ae127d1fa3092b95168e4a88e2f8 runc version: v1.0.3-0-gf46b6ba init version: de40ad0 Security Options: apparmor seccomp Profile: default Kernel Version: 5.4.0-96-generic Operating System: Ubuntu 20.04 LTS OSType: linux Architecture: x86_64 CPUs: 8 Total Memory: 30.86GiB Name: VM-3-4-ubuntu ID: IDVL:ZVEF:S7BH:ABOT:DMVT:ME3D:5MOZ:VWUQ:2XOJ:SDM5:YMQE:HVSD Docker Root Dir: /var/lib/docker Debug Mode: false Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Registry Mirrors: https://registry.docker-cn.com/ http://hub-mirror.c.163.com/ https://mirror.ccs.tencentyun.com/ Live Restore Enabled: false WARNING: No swap limit support
方案2 改后未生效,但操作过的
修改/etc/resolv.conf 文件 并重启docker服务
添加内容:
nameserver 8.8.8.8
nameserver 8.8.4.4
以上方案均需要执行
ubuntu@VM-3-4-ubuntu:/etc/docker$ sudo systemctl daemon-reload
ubuntu@VM-3-4-ubuntu:/etc/docker$ sudo systemctl restart docker
镜像拉取和服务器网络状态有关系
这篇关于ubuntu docker pull 失败 Error response from daemon: Get https://registry-1.docker.io/v2/的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!
- 2024-11-14Docker端口:你真的公开了哪些东西?
- 2024-11-14用DOCKER在家里的实验室里搞些酷炫的玩意儿
- 2024-11-05掌握Docker:高效安全的十大最佳实践
- 2024-11-05在 Docker Compose 中怎么设置端口映射-icode9专业技术文章分享
- 2024-11-05在 Docker Compose 中怎么设置环境变量-icode9专业技术文章分享
- 2024-11-04Docker环境部署项目实战:新手入门教程
- 2024-11-04Docker环境部署资料:新手入门教程
- 2024-11-01Docker环境部署教程:新手入门指南
- 2024-11-01超越Docker:苹果芯片上的模拟、编排和虚拟化方案讲解
- 2024-11-01Docker环境部署:新手入门教程