docker - Fly:无法 ping docker 注册表
问题描述
我试图通过将输入任务传递给大厅来运行一个简单的构建。这是我的飞行命令,
fly -t tutorial e -c inputs_required.yml -i some-important-input=.
和我的 yml 文件,
---
platform: linux
image_resource:
type: docker-image
source: {repository: busybox}
inputs:
- name: some-important-input
run:
path: ls
args: ['-alR']
我收到以下错误消息,
resource script '/opt/resource/check []' failed: exit status 1
stderr:
failed to ping registry: 2 error(s) occurred:
* ping https: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
* ping http: Get http://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
errored
请注意,我不在代理后面。我也无法 ping https://registry-1.docker.io/v2/。
解决方案
简单的原因是您的主机无法访问docker.io
默认情况下的 docker 注册表。
我不熟悉fly
。但我认为您的 yaml 文件中的图像源{ repository:busybox}
应该是可以在 command 中使用的特定图像docker pull
。
此外,您可以先在主机上尝试本地映像。然后在某个远程注册表中尝试远程映像。
推荐阅读
- jdbc - 批量执行时如何查找失败的sql语句
- r - 为什么某些 R 包在新版本中不更改版本号
- html - 为什么我不能将下拉菜单放在按钮下?
- python - 有没有人在 google colab notebook 中成功嵌入了散景服务器?
- java - Azure IoT 中心:“签名证书信息与链元素不匹配”
- d3.js - D3 模块加载产生无法读取未定义的属性“文档”
- django - 如何使用 django 自定义表单保存多对多字段
- html - 有没有人在 HTML Table 中体验过这种边框格式并找到了解决方案?
- php - 使用 oneToMany 关系将动态字段数据数组保存到数据库
- do-while - 当一个条件等于另一个条件但有异常时,如何执行循环?