osx - Docker Volume Empty -


i'm trying go through docker tutorial , mount volume host os, in

$ sudo docker run -d -p --name web -v /src/webapp:/opt/webapp training/webapp python app.py 

i'm trying mount directory host os (osx) vm:

$  docker run -p  --name web -v /users/simon/source/test:/opt/test training/webapp ls -al /opt/test total 4 drwxr-xr-x 2 root root   40 jun 27 17:48 . drwxr-xr-x 5 root root 4096 jun 27 17:51 .. $ 

but host os:

$ ls -al /users/simon/source/test total 0 drwxr-xr-x   3 simon  staff   102 jun 27 10:55 . drwxr-xr-x@ 36 simon  staff  1224 jun 27 10:55 .. -rw-r--r--   1 simon  staff     0 jun 27 10:55 foo $ 

perhaps related - understanding docker volumes supposed stored in /var/lib/docker, doesn't exist me:

$ ls -al /var/lib/docker ls: /var/lib/docker: no such file or directory 

docker server not work on darwin. that's why use vm. when use -v, send command docker server running on vm. path send or relative server, not client. /var/lib/docker present on vm, not host. empty volume see expected behavior mounts /users/simon/source/test vm not exists, therefor gets created docker , empty.

in order achieve trying do, either move vm or setup shared directories or better, not use bind-mounts. see dockerfile's add alternative.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -