Hi all,
I am trying to use docker with Jenkins.
I installed it as a global toolconfiguration call myDocker.
I then tried to write a pipeline script as below
```
pipeline {
agent any
// set path
stages {
stage ('set docker path'){
steps{
script{
def dockerHome = tool 'myDocker'
env.PATH = "${dockerHome}/bin:${env.PATH}"
}
sh 'docker ps'
}
}
//delete
stage('node') {
agent {
docker { image 'node:7-alpine' }
}
steps {
sh 'node --version'
}
}
}
}
```
however, it keeps throwing me an error
```
+ docker ps
/var/lib/jenkins/workspace/openFaaS_getdata@tmp/durable-270f2b11/script.sh:
line 1: docker: command not found
```
I tried referencing other posts on stack overflow but could not find what
is wrong.
Any help?
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/2c4833ee-1210-4815-9b82-e4efb6f1f95f%40googlegroups.com.