卧槽 见鬼了! Docker 配置国内源之后还走官方源,重启无数遍问题依旧

查看 68|回复 4
作者:fdghjk   
问题是修改/etc/docker/daemon.json 的源为国内源之后,Docker 还是走官方源导致拉取镜像失败。
这个问题只出现在一台国内主机上,其他的国内主机都正常,就这个 nat 机搞特殊
刚装好的 debian12 最新版本系统,最干净的状态,然后装的最新的 Docker ,按照官方的脚本手动安装的,之前安装过无数遍了,排除是安装错误的问题
运行 docker info
Client: Docker Engine - Community
Version:    24.0.7
Context:    default
Debug Mode: false
Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
Images: 0
Server Version: 24.0.7
Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
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 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3dd1e886e55dd695541fdcd67420c2888645a495
runc version: v1.1.10-0-g18a0cb0
init version: de40ad0
Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
Kernel Version: 6.1.0-17-cloud-amd64
Operating System: Debian GNU/Linux 12 (bookworm)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.937GiB
Name: ser074984144056
ID: 1235fff6-aa25-48a0-a26f-2863a7daceb4
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
  127.0.0.0/8
Registry Mirrors:
  https://docker.mirrors.ustc.edu.cn/
Live Restore Enabled: false
重启 docker 并且 重启 vps
然后拉取 Nginx 测试,docker run -d --name nginx nginx
然后就是报错
Unable to find image 'nginx:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": read tcp 172.16.0.45:38932->34.226.69.105:443: read: connection reset by peer.
See 'docker run --help'.
大佬们求指导怎么排查

Docker, version, false, Nginx

fdghjk
OP
  
curl https://docker.mirrors.ustc.edu.cn
{"message":"docker.mirrors.ustc.edu.cn is currently USTCnet-only","ip":"43.248.96.170"}
----
docker run -d --name nginx nginx
```
Unable to find image 'nginx:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": read tcp 172.16.0.45:46072->54.196.99.49:443: read: connection reset by peer.
See 'docker run --help'.
```
离谱!!!!
iyear   
{"message":"docker.mirrors.ustc.edu.cn is currently USTCnet-only","ip":"43.248.96.170"}
不是都写了人家的 docker 镜像现在只给校园网内部用了么。。所以错误重试到最后的兜底官方镜像了
jayeli   
https://docker.mirrors.sjtug.sjtu.edu.cn
XEdge   


来源: https://mirrors.ustc.edu.cn/help/dockerhub.html
您需要登录后才可以回帖 登录 | 立即注册

返回顶部