I have jenkins running as docker container and i am installing docker from docker.com latest in global tool configuration.
in Jenkinsfile while initializing its working fine.
stage('Initialize') {
steps {
script {
def dockerHome = tool 'myDocker'
env.PATH = "${dockerHome}/bin:${mavenHome}/bin:${env.PATH}"
But in pipeline , its failing with below error.
ava.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
at java.lang.ProcessImpl.start(ProcessImpl.java:134)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "docker": error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:250)
Anything i am missing?
question from:
https://stackoverflow.com/questions/65935953/caused-java-io-ioexception-cannot-run-program-docker-error-2-no-such-file 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…