Jenkins pipeline fails with docker not found

I have an agent where docker is installed , in my pipeline im using this agent .
In the pipline i just run one step where i check docker installation " docker --version"

But i’m getting docker not found !!!
I couldn’t understand the why , and even i dont have acces on that agent .

What could be the problem , and what should i do ?


Not having access to the agent is going to be challenging. You need to talk to whomever does have access to that agent and get them to confirm whether or not you’re supposed to have access to the docker command itself.

Hi, I have a similar problem, I mount an agent inside a kubernetes POD with the jenkins inbound-agent image and a docker image, everything starts fine, the agent connects, but when executing a pipeline it sends me the error docker: not found

I might have to take some time to stand up a Jenkins/Docker instance this week. I did actually run into this issue at work and know that the pre-built jenkins/inbound-agent does not have docker cli installed in it. However, I’m on vacation and hadn’t planned on revisiting that issue until next month.

A quick search at Docker shows that there doesn’t seem to be any prebuilt agent with the docker cli installed. You are very likely going to have to customize that agent to add the tools you need or consider one of the other tools available for building images. Like img, Kaniko, or others.