How to run jenkins pipeline job with docker comman

2019-07-30 18:40发布

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条回答
一纸荒年 Trace。
2楼-- · 2019-07-30 19:11

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') {
...
}
查看更多
登录 后发表回答