首页 > 解决方案 > 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/

标签: dockerconcoursefly

解决方案


简单的原因是您的主机无法访问docker.io默认情况下的 docker 注册表。

我不熟悉fly。但我认为您的 yaml 文件中的图像源{ repository:busybox}应该是可以在 command 中使用的特定图像docker pull

此外,您可以先在主机上尝试本地映像。然后在某个远程注册表中尝试远程映像。


推荐阅读