会话无法连接到Docker存储库 [英] Concourse Can't Connect to Docker Repository

查看:177
本文介绍了会话无法连接到Docker存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新手,并尝试在自己的环境中进行设置。我在Windows计算机上的Virtualbox 6.1.4 r136177上运行Ubuntu 18.04。我设法使节点运行并设置了Concourse Worker,并且能够成功访问我的concourse仪表板。当我尝试运行此页面上概述的简单的hello world管道时,发生了问题: https://concourse-ci.org/hello-world-example.html

I'm new to concourse and trying to set it up in my environment. I'm running Ubuntu 18.04 on Virtualbox 6.1.4 r136177 on Windows machine. I managed to get the node running and concourse worker set up, and I was able to access my concourse dashboard successfully. The problem occurred when I was trying to run a simple hello world pipeline as outlined on this page : https://concourse-ci.org/hello-world-example.html

错误提示:

[31mERRO [0m[0004] check failed: get remote image: Get https://index.docker.io/v2/: dial tcp: lookup index.docker.io on [::1]:53: read udp [::1]:55989->[::1]:53: read: connection refused

搜索类似错误表明virtualbox可能无法连接到docker存储库。因此,我将docker安装到我的系统并运行以下命令:

Googling for similar error indicates that virtualbox might not be able to connect to docker repository. So I proceed with installing docker to my system and run the following command :

sudo docker run hello-world

但这一次,docker成功地拉出了映像。因此,我认为这与我的virtualbox无关。有没有人遇到过同样的问题并找到了解决方案?

But this this time docker successfully pulled the image. So I think it is not an issue with my virtualbox. Have anyone experienced the same issue and found a solution?

更新

以下问题激励我建立自己的注册表:
如何在concourse-docker中使用本地docker映像作为资源

The following question inspire me to build my own registry : How to use a local docker image as resource in concourse-docker

我已经配置了本地docker注册表,并验证了它确实可以通过从我自己的注册表中提取我的映像来工作。因此,我通过修改hello world示例,配置了一个简单的大厅管道来使用我的注册表:

I have configured my local docker registry, and have verified that it does work by pulling my image from my own registry. So I configured a simple concourse pipeline to use my registry by modifying the hello world example :

---
jobs:
  - name: job
    public: true
    plan:
      - task: simple-task
        config:
          platform: linux
          image_resource:
            type: docker-image
            source:
              repository: 127.0.0.1:5000/busybox
              tag: latest
              insecure_registries: [ "127.0.0.1:5000" ]
          run:
            path: echo
            args: ["Hello, world!"]

但是随后我遇到以下错误:

But then I run into the following error :

resource script '/opt/resource/check []' failed: exit status 1

stderr:
failed to ping registry: 2 error(s) occurred:

* ping https: Get https://127.0.0.1:5000/v2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers
* ping http: Get http://127.0.0.1:5000/v2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers


推荐答案

127.0.0.1 可能是指Check容器的IP,而不是Concourse作为工作人员运行的机器的IP(除非您将 houdini 作为容器策略)。尝试获取运行docker的机器的实际IP,然后尝试。

That 127.0.0.1 is likely referring to the IP of the check container, not the machine where Concourse is running as a worker (unless you have houdini as the container strategy). Try getting the actual IP of the machine running docker and try that.

这篇关于会话无法连接到Docker存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆