我有一个运行在Docker容器中的Jenkins,现在我想使用流水线构建一个Docker镜像,但是Jenkins容器总是提示找不到Docker。
[simple-tdd-pipeline] Running shell script
+ docker build -t simple-tdd .
/var/jenkins_home/workspace/simple-tdd-pipeline@tmp/durable-
ebc35179/script.sh: 2: /var/jenkins_home/workspace/simple-tdd-
pipeline@tmp/durable-ebc35179/script.sh: docker: not found
以下是我如何运行Jenkins镜像的步骤:
docker run --name myjenkins -p 8080:8080 -p 50000:50000 -v
/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock
jenkins
以下是Jenkins镜像的DockerFile: https://github.com/jenkinsci/docker/blob/9f29488b77c2005bbbc5c936d47e697689f8ef6e/Dockerfile
curl: (23) 写入失败 (0 != 16384)
- kitko112