Jenkinsfile не может запустить докер - PullRequest
0 голосов
/ 14 мая 2019

Я слежу за этим блогом https://getintodevops.com/blog/building-your-first-docker-image-with-jenkins-2-guide-for-developers 1) git clone, сделайте репозиторий - сделано 2) создайте образ локально - сделано 3) запустите его локально --done 4) "Build now" выдаст следующую ошибку

Running on Jenkins in /Users/mano/.jenkins/workspace/so_build_docker_with_jenkins
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Clone repository)
[Pipeline] checkout
No credentials specified
Cloning the remote Git repository
Cloning repository https://github.com/getintodevops/hellonode.git
 > git init /Users/mano/.jenkins/workspace/so_build_docker_with_jenkins # timeout=10
Fetching upstream changes from https://github.com/getintodevops/hellonode.git
 > git --version # timeout=10
 > git fetch --tags --progress https://github.com/getintodevops/hellonode.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url https://github.com/getintodevops/hellonode.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/getintodevops/hellonode.git # timeout=10
Fetching upstream changes from https://github.com/getintodevops/hellonode.git
 > git fetch --tags --progress https://github.com/getintodevops/hellonode.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 2241f48e193a956e9c25706555ee3e4c9c0728c5 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 2241f48e193a956e9c25706555ee3e4c9c0728c5
Commit message: "feat: dummy test"
First time build. Skipping changelog.
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build image)
[Pipeline] sh
+ docker build -t getintodevops/hellonode .
/Users/mano/.jenkins/workspace/so_build_docker_with_jenkins@tmp/durable-91e2f197/script.sh: line 1: docker: command not found
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
ERROR: script returned exit code 127
Finished: FAILURE

1 Ответ

0 голосов
/ 21 мая 2019

Я удалил все свои докеры и установки Jenkins, а затем сделал чистую установку Jenkins и докера, и он начал работать для меня

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...