Docker Community Forums

Share and learn in the Docker community.

Cannot access daemon API docker on Mac


#1

Hi all,

i’ve just install docker on mac and running jenkins image from their official image. But i’ve found some issue when create jenkins slave in same host. i found the docker daemon API cannot open even though i’ve include -v /var/run/docker.sock:/var/run/docker.sock when running that image.

This my error
Warning: failed to get default registry endpoint from daemon (Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.38/info: dial unix /var/run/docker.sock: connect: permission denied). Using system default: https://index.docker.io/v1/

Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.38/images/create?fromImage=python&tag=2-alpine: dial unix /var/run/docker.sock: connect: permission denied

script returned exit code 1

Thanks in advance