gpt4 book ai didi

tcp - 在 docker 中尝试 docker 获取 TCP 连接被拒绝错误

转载 作者:可可西里 更新时间:2023-11-01 02:43:29 26 4
gpt4 key购买 nike

我正在尝试在 docker 中运行 docker 并得到 TCP 127.0.0.1:5000: connection refused。谁能解释为什么会这样以及我该如何解决。

这是我已经厌倦的:

docker run -it --privileged --name docker-server-test -d docker:1.7-dind

docker run --rm --link docker-server:docker docker:1.7 pull my-server:5000/qe/busybox
Unable to find image 'docker:1.7' locally
Trying to pull repository docker.io/library/docker ... 1.7: Pulling from library/docker
f4fddc471ec2: Already exists
da0daae25b21: Already exists
413668359dd0: Already exists
ab205815427f: Already exists
e8ace195c6b6: Already exists
2129588b76a3: Already exists
63f71ebd654b: Already exists
f3231b3888dd: Already exists
d449c5a1e017: Already exists

library/docker:1.7: The image you are pulling has been verified.
Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:c3666cc6458e02d780492c75acf1b0bf3424c8dd6882361438a9b93b46c2aa55
Status: Downloaded newer image for docker.io/docker:1.7

Pulling repository my-server:5000/qe/busybox
Get http://localhost:5000/v1/repositories/qe/busybox/tags: dial tcp 127.0.0.1:5000: connection refused

最佳答案

看起来您正在尝试从本地计算机上运行的注册表中提取图像 - 在这种情况下,当您指定 localhost 作为从中提取图像的位置时,它会尝试从相对于 Docker 守护程序容器的 localhost 拉取(这不是您的注册表正在监听的位置)。您可能想改为从 host-ip:5000/qe/busybox 拉取(可能类似于 192.168.0.x:5000/qe/busybox)。

关于tcp - 在 docker 中尝试 docker 获取 TCP 连接被拒绝错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34341899/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com