Sunday, March 11, 2018

dind docker in docker , permission denied on /var/run/docker.sock



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.33/version: dial unix /var/run/docker.sock: connect: permission denied

ls -alh /var/run/docker.sock
srw-rw----. 1 root docker 0 Mar 11 15:45 /var/run/docker.sock


doing "chmod 777 /var/run/docker.sock" doesn't help


on the host:

docker version
Client:
Version: 1.12.6
API version: 1.24


in the container:

docker version
Client:
Version: 17.10.0-ce
API version: 1.33



The problem went away by installing on the host the latest docker version as per https://docs.docker.com/install/linux/docker-ce/centos/#install-using-the-convenience-script

No comments: