[Solved] Docker in Docker - error with docker.sock


i use docker for windows an windows 10 pro (1607). I try to run docker inside docker to build arm images in a container. After reading several posts/hints/… i found the hint to map -v /var/run/docker.sock:/var/run/docker.sock to the container. But this isn’t working. I alawys geht the error message “Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?”

I started a docker container like this (with a shell): docker run --privileged --name mycontainer -v “c:/Users/Mani/pers_data:/var/lib/docker” -v /var/run/docker.sock:/var/run/docker.sock -ti docker:test /bin/sh

Can anyone help me? My goal is to run the container and build arm images inside.

Thank you.


I’ve found the solution: two leading slashes at the first path: -v //var/run/docker.sock:/var/run/docker.sock

The whole command:

docker run --privileged --name mycontainer -v “c:/Users/Mani/pers_data:/var/lib/docker” -v //var/run/docker.sock:/var/run/docker.sock -ti docker:test /bin/sh