簡體   English   中英

Jenkinsfile無法運行docker

[英]Jenkinsfile not able to run docker

我關注這個博客https://getintodevops.com/blog/building-your-first-docker-image-with-jenkins-2-guide-for-developers 1)git clone repo - done 2)構建圖像本地 - 完成3)在本地運行 - 完成4)“立即構建”給出以下錯誤

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

我刪除了所有的docker和Jenkins安裝,然后徹底安裝了Jenkins和docker,它開始為我工作

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM