gpt4 book ai didi

docker 推送到本地注册表失败

转载 作者:行者123 更新时间:2023-12-05 03:37:05 26 4
gpt4 key购买 nike

Registry 容器在 5000 端口运行。

# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
accbeafa34fe ibmcom/registry:2.6.2.5 "registry serve /etc…" 3 minutes ago Up 3 minutes 0.0.0.0:5000->5000/tcp, :::5000->5000/tcp local-registry
sudo -E docker push localhost:5000/pgp-bench:latest
The push refers to repository [localhost:5000/pgp-bench]
ca9a5caaa0d5: Pushed
dd9235795971: Pushed
4dfdebe31f24: Pushed
98a59ff53764: Retrying in 1 second

-->on retrying
# docker push localhost:5000/pgp-bench:latest
The push refers to repository [localhost:5000/pgp-bench]
Get http://localhost:5000/v2/: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

在 curl 上,它一直在等待

# curl http://localhost:5000

注册表容器的日志

time="2021-10-08T06:25:19.963905582Z" level=info msg="endpoint local-5003 disabled, skipping" environment=development go.version=go1.11.9 ins
tance.id=88f73ea0-77d6-425f-8259-0b3717c76b7a service=registry version=e38b0207
time="2021-10-08T06:25:19.963921607Z" level=info msg="endpoint local-8083 disabled, skipping" environment=development go.version=go1.11.9 ins
tance.id=88f73ea0-77d6-425f-8259-0b3717c76b7a service=registry version=e38b0207
time="2021-10-08T06:25:19.964454493Z" level=info msg="using redis blob descriptor cache" environment=development go.version=go1.11.9 instance
.id=88f73ea0-77d6-425f-8259-0b3717c76b7a service=registry version=e38b0207
time="2021-10-08T06:25:19.964744256Z" level=info msg="listening on [::]:5000" environment=development go.version=go1.11.9 instance.id=88f73ea
0-77d6-425f-8259-0b3717c76b7a service=registry version=e38b0207
time="2021-10-08T06:25:59.965390038Z" level=debug msg="filesystem.Stat(\"/\")"
environment=development go.version=go1.11.9 instance.id=88f73e
a0-77d6-425f-8259-0b3717c76b7a service=registry trace.duration=35.698µs trace.file="/go/src/github.com/docker/distribution/registry/storage/d
river/base/base.go" trace.func="github.com/docker/distribution/registry/storage/driver/base.(*Base).Stat" trace.id=8f6467ca-1438-45cc-9910-6c
ba6845ca83 trace.line=137 version=e38b0207

我已经尝试了类似问题中提到的所有可能选项,例如

  1. net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
  2. https://github.com/ubuntu/microk8s/issues/196

但似乎没有什么可以帮助解决问题。关于如何寻求解决方案的任何建议?

最佳答案

我遇到了同样的问题。

我将标签名称更改为 127.0.0.1:5000 而不是 localhost 并在推送时按预期完成。

关于docker 推送到本地注册表失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69450178/

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