Mounting a volume with docker in docker

Nope. Inside the "docker" container, you only get a Docker client, not the whole thing. Once you mount the Docker socket inside your "docker" container, when you execute Docker commands, they go straight to the Docker "server" running on your actual Docker host. As such, that folder is expected to exist in your Docker Host.

Example how to mount a volume with docker in docker:

host$ pwd
/var/my-project

host$ docker run -v /var/run/docker.sock:/var/run/docker.sock -v $PWD:/app docker -it sh

/ # ls -l /app ### inside first docker
<LIST OF PROJECT FILES>

/ # docker run -v /var/my-project:/inception docker sh ### you need to pass HOST directory NOT currently running (/app) container directory

/ # ls -l /inception ### inside second docker
<LIST OF PROJECT FILES>