如何通过.yml文件绑定套接字..?

问题描述 投票:0回答:2

我的pipeline.yml文件看起来如下,我正在尝试安装docker并在ubuntu容器中运行docker pull,并在其中创建了大厅。 FYI ...

---
resources:
- name: hello_hapi
  type: git
  source:
    uri: https://<username>:<password>@github.com/rohithmn3/hello_hapi.git
    branch: master

platform: linux

jobs:
- name: job-hello-world
  public: true
  plan:
  - get: hello_hapi
    trigger: true
  - task: hello-world
    config:
      platform: linux
      image_resource:
        type: docker-image
        source:
          repository: ubuntu
          volumes: /var/run/docker.sock:/var/run/docker.sock
          privileged: true
      inputs:
        - name: hello_hapi
      outputs:
        - name: update_times
      run:
        path: hello_hapi/task_show_uname.sh

我把代码保存在github公共回购:https://github.com/rohithmn3/hello_hapi/blob/master/task_show_uname.sh

当我运行大厅管道时,它失败 - 因为它无法在docker安装后运行docker images命令。以下是错误/异常:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

我遇到错误/异常,因为我无法在docker构建时绑定套接字。在这帮帮我......!

此致,罗希特

docker docker-compose concourse concourse-git-resource
2个回答
0
投票

我得到了类似的错误,我作为超级用户sudo docker-compose up运行docker修复


0
投票

我敢肯定,到目前为止你已经继续前进了,但为了其他人的利益:在Linux上这通常意味着docker服务没有启动:

sudo systemctl start docker.service

要确保服务始终在后台运行,请使用“enable”:

sudo systemctl enable docker.service
© www.soinside.com 2019 - 2024. All rights reserved.