我正在按照这个教程进行学习:
https://www.linkedin.com/pulse/building-docker-pipeline-cloudbees-jenkins-jay-johnson
我正在使用Docker 17运行Jenkins:
docker run -d -p 8080:8080 -p 50000:50000 --name jenkins jenkins
我按照说明替换了Jay的凭据,并将我的凭据添加到全局,然后在管道脚本中重命名了凭据。但是当我尝试构建时,我收到以下错误:
Proceeding
[Pipeline] withEnv
[Pipeline] {
[Pipeline] withDockerRegistry
Wrote authentication to /var/jenkins_home/.dockercfg
[Pipeline] {
[Pipeline] stage (Building)
Using the ‘stage’ step without a block argument is deprecated
Entering stage Building
Proceeding
[Pipeline] sh
[alfred-master] Running shell script
+ docker build -t jayjohnson/django-slack-sphinx:testing django
/var/jenkins_home/workspace/alfred-master@tmp/durable-713ce0d7/script.sh: 2: /var/jenkins_home/workspace/alfred-master@tmp/durable-713ce0d7/script.sh: docker: not found
[Pipeline] }
[Pipeline] // withDockerRegistry
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 127
Finished: FAILURE
我假设这是在寻找Docker二进制文件。
如何从Docker容器内部构建来自仓库的Docker镜像?