gpt4 book ai didi

docker - Skaffold 开发失败

转载 作者:行者123 更新时间:2023-12-04 18:37:22 25 4
gpt4 key购买 nike

运行 后出现此错误支架开发 .

Step 1/6 : FROM node:current-alpine3.11
exiting dev mode because first build failed: unable to stream build output: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.49.1:53: read udp 192.168.49.2:35889->192.168.49.1:53: i/o timeout. Please fix the Dockerfile and try again..

这是 skaffold.yml
apiVersion: skaffold/v2beta11
kind: Config
metadata:
name: *****
build:
artifacts:
- image: 127.0.0.1:32000/auth
context: auth
docker:
dockerfile: Dockerfile
deploy:
kubectl:
manifests:
- infra/k8s/auth-depl.yaml
local:
push: false
artifacts:
- image: 127.0.0.1:32000/auth
context: auth
docker:
dockerfile: Dockerfile
sync:
manual:
- src: "src/**/*.ts"
dest: .

我已经尝试了我在网上看到的所有可能的解决方案,包括添加 8.8.8.8 作为 DNS,但错误仍然存​​在。我正在使用 Linux 并运行 ubuntu,我也在本地使用 Minikube。请协助。

最佳答案

这是一个社区 Wiki 答案,已发布以提高可见性,因此请随时对其进行编辑并添加您认为重要的任何其他详细信息。
在这种情况下:

minikube delete && minikube start
解决了问题,但您可以从重新启动 开始 docker 守护进程 .因为这是 迷你酷贝 集群和 支架 用于其构建 Minikube 的 Docker 守护进程 ,正如 Brian de Alwis 所建议的那样在他的评论中,你可以从:
minikube stop && minikube start
或者
minikube ssh
su
systemctl restart docker
我搜索了类似的错误,在很多情况下,例如 herein this thread ,将您的 DNS 设置为可靠的名称,例如 8.8.8.8也可能有帮助:
sudo echo "nameserver 8.8.8.8" >> /etc/resolv.conf
如果您使用 迷你酷贝 你应该首先:
minikube ssh

su ### to become root
然后运行:
echo "nameserver 8.8.8.8" >> /etc/resolv.conf
以下错误消息:
Please fix the Dockerfile and try again
在与 Dockerfile 类似的情况下可能会有些误导。可能完全没问题,但我们可以在其他部分阅读:
lookup registry-1.docker.io on 192.168.49.1:53: read udp 192.168.49.2:35889->192.168.49.1:53: i/o timeout.
它肯定与失败的 DNS 查找有关。这很好描述 here众所周知的问题。

Get i/o timeout

Get https://index.docker.io/v1/repositories//images: dial tcp: lookup on :53: read udp :53: i/o timeout

Description

The DNS resolver configured on the host cannot resolve the registry’shostname.

GitHub link

N/A

Workaround

Retry the operation, or if the error persists, use another DNSresolver. You can do this by updating your /etc/resolv.conf filewith these or other DNS servers:

nameserver 8.8.8.8 nameserver 8.8.4.4

关于docker - Skaffold 开发失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65552399/

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