Docker volume located in /tmp on OSX empty -


when try run container on osx (with docker-machine on parallels vm) , mount volume located in /tmp volume seems empty.

> mkdir -p /tmp/foo/bar > docker run -ti -v /tmp/foo:/foo ubuntu ls /foo 

i expect see list bar, however, it's empty. works:

> mkdir -p /users/myuser/tmp/foo/bar > docker run -ti -v /users/myuser/tmp/foo:/foo ubuntu ls /foo bar 

the same happens folders created mktemp end in /folders. how can make docker mount folders correctly?

this known problem. reason behind linked vm, when it's created mounts folders within users directory, makes folder available containers. here similar issue https://github.com/docker/kitematic/issues/1192