Unable to build docker image inside k8s agent pod

Getting this error while trying to build docker image.

  • make -C jenkins-pipelines/docker-images/k8s-helm push
    3 make: Entering directory ‘/drone/src/jenkins-pipelines/docker-images/k8s-helm’
    4 docker build -f Dockerfile . -t us.gcr.io/testing7/jenkins/jenkins-k8s-helm:latest
    5 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
    6 make: *** [Makefile:8: build] Error 1

My drone.yaml file

kind: pipeline
name: ops

steps:

The volume syntax in your example is invalid. For a working example see:
https://docs.drone.io/pipeline/docker/examples/services/docker/

Getting this error
error":“linter: untrusted repositories cannot mount host volumes”,“event”:“push”,“level”:“warning”,“msg”:“trigger: yaml linting error”,“ref”:“refs/heads/poc-drone”,“repo”:“ops”,“time”:“2019-09-13T02:10:47Z”}

I recommend searching this forum for existing threads for this error. http://discuss.harness.io/search?q=linter%3A%20untrusted%20repositories%20cannot%20mount%20host%20volumes

Thanks for your reply. Now i can able to mount it using the trusted option.
But the container which has a volume mount is keep on running without giving any error.

Thank you it is working now.
Followed this example https://docs.drone.io/pipeline/docker/examples/services/docker_dind/