Unable to run Docker from inside Docker

I don’t know a solution, but this: Docker-in-docker vs mounting /var/run/docker.sock
and this: https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ may be of interest.