简体   繁体   English

为什么 docker 在 manjaro 中不工作,连接被拒绝

[英]Why docker not working in manjaro, connection refuzed

Every action throws an error.每个动作都会引发错误。

For example:例如:

[greenjoy@greenjoyPC ~]$ docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:50383->[::1]:53: read: connection refused.

Some information:一些信息:

[greenjoy@greenjoyPC ~]$ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc., v2.13.0)
  dev: Docker Dev Environments (Docker Inc., v0.0.5)
  extension: Manages Docker extensions (Docker Inc., v0.2.16)
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
  scan: Docker Scan (Docker Inc., v0.22.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.17
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
  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 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
 runc version: 
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.15.81-1-MANJARO
 Operating System: Ubuntu Core 18
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 11.58GiB
 Name: greenjoyPC
 ID: 7JRW:4CYG:5CUT:PC2B:HOVA:7OPT:I6PR:3AD5:DYD7:2FOK:MVMU:ZCYH
 Docker Root Dir: /var/snap/docker/common/var-lib-docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

And docker-desktop won't load no matter how long you wait.Just docker desktop starting...无论您等待多长时间,docker-desktop 都不会加载。只需 docker 桌面开始...

Tried several ways from different sources but nothing works.尝试了来自不同来源的几种方法,但没有任何效果。

I am using Manjaro and after starting the daemon and putting my user into the docker-group everything works as expected (using your particular docker run command).我正在使用 Manjaro,在启动守护进程并将我的用户放入 docker-group 后,一切都按预期工作(使用您特定的 docker 运行命令)。

However, from your error message, it rather looks like a connectivity problem to the server docker repositories.但是,从您的错误消息来看,它看起来像是服务器 docker 存储库的连接问题。 You may check on your firewalls whether connections are blocked.您可以检查您的防火墙是否连接被阻止。

There is a similar case here, where setting a different DNS server seemed to work: why do i get this error when pulling an image in docker这里有一个类似的案例,设置不同的 DNS 服务器似乎有效: why do i get this error when pulling an image in docker

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM