Docker 中的 ConcourseCI:安装:权限被拒绝(您是根用户吗?)
ConcourseCI in Docker: mount: permission denied (are you root?)
运行 一个带有 ConcourseCI 3.13.0 运行ning 的简单 "Hello World" 管道 Docker (docker-compose) 导致以下错误:
mount: permission denied (are you root?)
我的设置如下:
Alpine Linux VM 运行ning docker-与以下docker-compose.yml组成:
version: '3'
services:
concourse-db:
image: postgres
environment:
- POSTGRES_DB=concourse
- POSTGRES_PASSWORD=concourse_pass
- POSTGRES_USER=concourse_user
- PGDATA=/database
volumes:
- ./database:/database
concourse-web:
image: concourse/concourse
command: web
links:
- concourse-db
depends_on:
- concourse-db
ports:
- "8080:8080"
volumes:
- "./keys/web:/concourse-keys"
environment:
- CONCOURSE_POSTGRES_HOST=concourse-db
- CONCOURSE_POSTGRES_USER=concourse_user
- CONCOURSE_POSTGRES_PASSWORD=concourse_pass
- CONCOURSE_POSTGRES_DATABASE=concourse
- CONCOURSE_BASIC_AUTH_USERNAME=myuser
- CONCOURSE_BASIC_AUTH_PASSWORD=mypass
concourse-worker:
image: concourse/concourse
command: worker
privileged: true
links:
- concourse-web
depends_on:
- concourse-web
volumes:
- ./keys/worker:/concourse-keys
environment:
- CONCOURSE_TSA_HOST=concourse-web:2222
- CONCOURSE_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]
大厅工作人员(在 Docker 内)运行正在作为 root:
host:~/concourse# ps aux
....
16466 root 0:00 /usr/local/bin/concourse worker
....
我知道,有以下问题:,不幸的是我不知道如何为任务"image_resource"定义"priviledged"
我尝试了以下管道并得到了同样的错误:
---
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]
resource_types:
- name: docker-image
privileged: true
type: docker-image
source:
repository: concourse/docker-image-resource
tag: latest
如果您在 运行 privileged: true
时看到容器安装问题,这通常是 outdated kernel 导致的。
运行 一个带有 ConcourseCI 3.13.0 运行ning 的简单 "Hello World" 管道 Docker (docker-compose) 导致以下错误:
mount: permission denied (are you root?)
我的设置如下:
Alpine Linux VM 运行ning docker-与以下docker-compose.yml组成:
version: '3'
services:
concourse-db:
image: postgres
environment:
- POSTGRES_DB=concourse
- POSTGRES_PASSWORD=concourse_pass
- POSTGRES_USER=concourse_user
- PGDATA=/database
volumes:
- ./database:/database
concourse-web:
image: concourse/concourse
command: web
links:
- concourse-db
depends_on:
- concourse-db
ports:
- "8080:8080"
volumes:
- "./keys/web:/concourse-keys"
environment:
- CONCOURSE_POSTGRES_HOST=concourse-db
- CONCOURSE_POSTGRES_USER=concourse_user
- CONCOURSE_POSTGRES_PASSWORD=concourse_pass
- CONCOURSE_POSTGRES_DATABASE=concourse
- CONCOURSE_BASIC_AUTH_USERNAME=myuser
- CONCOURSE_BASIC_AUTH_PASSWORD=mypass
concourse-worker:
image: concourse/concourse
command: worker
privileged: true
links:
- concourse-web
depends_on:
- concourse-web
volumes:
- ./keys/worker:/concourse-keys
environment:
- CONCOURSE_TSA_HOST=concourse-web:2222
- CONCOURSE_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]
大厅工作人员(在 Docker 内)运行正在作为 root:
host:~/concourse# ps aux
....
16466 root 0:00 /usr/local/bin/concourse worker
....
我知道,有以下问题:
我尝试了以下管道并得到了同样的错误:
---
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]
resource_types:
- name: docker-image
privileged: true
type: docker-image
source:
repository: concourse/docker-image-resource
tag: latest
如果您在 运行 privileged: true
时看到容器安装问题,这通常是 outdated kernel 导致的。