Concourse Quickstart Docker权限错误

时间:2018-04-28 12:14:18

标签: docker docker-compose concourse

我尝试按照documentation在本地设置Concourse CI。在我尝试运行示例hello-world管道之前,一切都很顺利。该作业导致此错误...

runc create: exit status 1: container_linux.go:264: starting container process caused "process_linux.go:339: container init caused \"rootfs_linux.go:56: mounting \\\"/worker-state/3.8.0/assets/bin/init\\\" to rootfs \\\"/worker-state/volumes/live/a8d3b403-19e7-4f16-4a8a-40409a9b017f/volume/rootfs\\\" at \\\"/worker-state/volumes/live/a8d3b403-19e7-4f16-4a8a-40409a9b017f/volume/rootfs/tmp/garden-init\\\" caused \\\"open /worker-state/volumes/live/a8d3b403-19e7-4f16-4a8a-40409a9b017f/volume/rootfs/tmp/garden-init: permission denied\\\"\""

看起来我收到了权限错误,但我已经仔细检查了容器是否以特权模式运行。

$ docker inspect --format='{{.HostConfig.Privileged}}' concourse_concourse_1
true

Docker撰写文件

version: '3'

services:
  concourse-db:
    image: postgres
    environment:
    - POSTGRES_DB=concourse
    - POSTGRES_PASSWORD=concourse_pass
    - POSTGRES_USER=concourse_user
    - PGDATA=/database

  concourse:
    image: concourse/concourse
    command: quickstart
    privileged: true
    depends_on: [concourse-db]
    ports: ["8080:8080"]
    environment:
    - CONCOURSE_POSTGRES_HOST=concourse-db
    - CONCOURSE_POSTGRES_USER=concourse_user
    - CONCOURSE_POSTGRES_PASSWORD=concourse_pass
    - CONCOURSE_POSTGRES_DATABASE=concourse
    - CONCOURSE_EXTERNAL_URL
    - CONCOURSE_BASIC_AUTH_USERNAME
    - CONCOURSE_BASIC_AUTH_PASSWORD
    - CONCOURSE_NO_REALLY_I_DONT_WANT_ANY_AUTH=true
- CONCOURSE_WORKER_GARDEN_NETWORK

管道

---
jobs:
- name: job-hello-world
  public: true
  plan:
  - task: hello-world
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: busybox}
      run:
        path: echo
        args: [hello world]

大厅版本

$ curl http://192.168.99.100:8080/api/v1/info
{"version":"3.12.0","worker_version":"2.0"}

其他版本

$ docker --version
Docker version 18.04.0-ce, build 3d479c0
$ docker-machine --version
docker-machine version 0.14.0, build 89b8332
$ docker-compose --version
docker-compose version 1.21.0, build unknown
$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.13.1 (17B1003)
      Kernel Version: Darwin 17.2.0
      Boot Volume: OSX

1 个答案:

答案 0 :(得分:1)

虽然表面上的所有内容看起来都像是最新的。重要的是要注意docker-machine在VM内部运行docker,如果您不定期更新它们,并且Concourse需要内核3.19或更高版本,则可能会过时。

运行docker info可以从Docker服务器的角度阐明这种情况。

对我有用的是......

$ docker-compose down
$ docker-machine upgrade
$ docker-compose up -d