【发布时间】:2020-07-28 21:52:11
【问题描述】:
我正在尝试使用 docker-compose 运行 jenkins
version: '3.5'
services:
jenkins:
build:
context: .
dockerfile: ./jenkins.Dockerfile
volumes:
- $PWD/jenkins_home:/var/jenkins_home
- $PWD:/app
ports:
- 8080:8080
但最终在尝试访问某些卷时出现此访问被拒绝错误。我无法在浏览器中打开 Localhost。
WARNING: The Docker Engine you're using is running in swarm mode.
Compose does not use swarm mode to deploy services to multiple nodes in a swarm. All containers will be scheduled on the current node.
To deploy your application across the swarm, use `docker stack deploy`.
Starting 8fd02292a7fe_ejercicio_jenkins_1 ...
Starting 8fd02292a7fe_ejercicio_jenkins_1 ... done
Attaching to 8fd02292a7fe_ejercicio_jenkins_1
8fd02292a7fe_ejercicio_jenkins_1 | Can not write to /var/jenkins_home/copy_reference_file.log. Wrong volume permissions?
8fd02292a7fe_ejercicio_jenkins_1 | touch: cannot touch '/var/jenkins_home/copy_reference_file.log': Permission denied
8fd02292a7fe_ejercicio_jenkins_1 exited with code 1
我该如何解决这个问题?
【问题讨论】:
标签: jenkins docker-compose continuous-integration devops continuous-deployment