我试图通过将输入任务传递给大厅来运行一个简单的构建。这是我的飞行命令,
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 注册表,即 docker.io
默认情况下。
我不熟悉 fly
.但我认为你的 yaml 文件中的图像源 { repository:busybox}
应该是可以在命令中使用的特定图像 docker pull
.
此外,您可以先在主机上尝试本地镜像。然后在某个远程注册表中尝试远程镜像。
关于docker - Fly:ping docker 注册表失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52145858/