简体   繁体   中英

Jenkins pipeline issue with Docker

When I was trying to run a Jenkins pipeline project, it failed giving this message under the "docker pull node:6-alpine":

<.jenkins/workspace/simple-node-js-react-npm-app@tmp/durable-431710c5/script.sh: line 2: docker: command not found

script returned exit code 127>

I have no idea what's going on here, and I couldn't access the directory mentioned in the error. I am pretty new to Jenkins.

As mentioned here , using the JENKINS Docker Plugin or JENKINS Docker Pipeline Plugin would not be enough to allow a node to use docker.
You still need to install docker on the node itself.

Please follow below steps:

  1. Install the docker engine ( yum install docker ) on server where Jenkins is running.
  2. Verify docker is installed: run command which docker .
  3. Click on Jenkins manage plugin and install docker plugin.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM