Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
263 views
in Technique[技术] by (71.8m points)

continuous integration - ConcourseCI - docker-image resource issue; mount: permission denied (are you root?)

I have concourse 3.8.0 running on my workstation which is Ubuntu 17.04 and here is my pipeline definition:

---
jobs:
- name: job-docker-image-resource
  public: true

  plan:
  - get: "golang_tools_docker_image"
  - task: docker-image-resource
    config:
      platform: linux
      image_resource:
        type: docker-image
        source: {repository: busybox}
      run:
        path: echo
        args: [docker-image-resource]

resources:
- name: "golang_tools_docker_image"
  type: docker-image
  source:
    repository: "golang"
    tag: "1.9.2-alpine3.7"

resource_types:
- name: docker-image
  type: docker-image
  source:
    repository: concourse/docker-image-resource
    tag: docker-1.12.6

And here is the output:

enter image description here

This works fine in concourse 2.7.7. I haven't tried any versions between 2.7.7 and 3.8.0 yet.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You need privileged: true on the resource type definition:

resource_types:
- name: docker-image
  privileged: true
  type: docker-image
  source:
    repository: concourse/docker-image-resource
    tag: latest

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...