我正在尝试使用以下命令运行单个节点Jenkins:
我正在使用jenkins / jenkins:lts图片。到目前为止我找到并解决的问题是:
它能够运行docker,但我仍然得到“Jenkins似乎没有在容器内运行”,并且脚本将不会执行。
失败日志在这里:
Jenkins does not seem to be running inside a container
$ docker run -t -d -u 1000:1000 -w "/var/jenkins_home/jobs/Test Pipeline/branches/master/workspace" -v "/var/jenkins_home/jobs/Test Pipeline/branches/master/workspace:/var/jenkins_home/jobs/Test Pipeline/branches/master/workspace:rw,z" -v "/var/jenkins_home/jobs/Test Pipeline/branches/master/workspace@tmp:/var/jenkins_home/jobs/Test Pipeline/branches/master/workspace@tmp:rw,z" -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** --entrypoint cat node:6.3
[Pipeline] {
[Pipeline] stage
[Pipeline] { (build)
[Pipeline] sh
[workspace] Running shell script
sh: 1: cannot create /var/jenkins_home/jobs/Test Pipeline/branches/master/workspace@tmp/durable-3f202d99/jenkins-log.txt: Directory nonexistent
sh: 1: cannot create /var/jenkins_home/jobs/Test Pipeline/branches/master/workspace@tmp/durable-3f202d99/jenkins-result.txt: Directory nonexistent
为什么它不相信它在容器中运行?它是否尝试在本地运行代理工作程序并失败?