How to run jenkins pipeline job with docker commands in stand alone Jenkins

与世无争的帅哥 提交于 2019-12-11 10:59:52

问题


I have a jenkins pipeline script which creates the Docker image and deploys it to the docker hub. I have installed the docker plugin but it complains about "docker command not found". I am not sure if I need to install docker in the same machine or something else need to happen?


回答1:


Yes you have to install docker on the slave machine which is running that pipeline script of docker plugin. I would suggest adding a label docker to the slave that has docker installed and then use the pipeline script as:

node('docker') {
...
}


来源:https://stackoverflow.com/questions/45489924/how-to-run-jenkins-pipeline-job-with-docker-commands-in-stand-alone-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!