Jenkins helm chart - pipeline agent throws 'docker not found' despite having docker

Hello everyone. I am trying to install jenkins by helm chart into my eks cluster. I have added ‘dind’ sidecar to agent. However, when I am trying to specify agent as

agent {
docker {
image ‘php:latest’
args ‘-v /var/run/docker.sock:/var/run/docker.sock’
}

it says docker not found. But if I use step with container specified as ‘dind’ and run docker version, pipeline shows correct shell output. Perhaps anyone knows how to overcome this?

If i change default agent image for helm chart to jenkins/jnlp-agent-docker:latest, it throws different error.
However, this image should have docker or else I have dind in sidecar on same pod

error for this image is:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Trying to use php image for simple commands.

Strangely commands from dind sidecar work but agent docker says there is an issue