docker - Fly:ping docker 注册表失败

标签 docker concourse

我试图通过将输入任务传递给大厅来运行一个简单的构建。这是我的飞行命令,

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/

相关文章:

git - 修复 git diff-files 列出 docker 中的所有文件

docker - 如何在 Docker 镜像中的 .Net Core 项目中启动 Kestrel

Centos7 上的 Docker : connection refused

linux - 如何在没有 Docker 的情况下运行 Linux 任务(在底层系统上)?

amazon-web-services - AWS CloudFormation 键不接受特殊字符

docker - 为什么即使使用-P选项,主机也无法在Docker容器中访问Web应用程序?