泊坞窗安装OSX文件夹为空 [英] Docker osx mounted folder is empty
问题描述
我试图安装我的项目文件夹在/ var / www会在容器中,容器,但文件相同的文件夹为空。问题是,可能与主机文件夹的权限,因为如果我尝试一些其他的文件夹,它的工作原理。
本作品:
泊坞窗运行 - 它-v〜/下载:在/ var / WWW的debian:杰西/斌/庆典
这不工作:
泊坞窗运行 - 它-v在/ var / WWW:在/ var / WWW的debian:杰西/斌/庆典
您不能挂载HOMEDIR〜/之外的任何文件夹,这是在Mac和Windows虚拟机限制。当VirtualBox是创建它装入你的用户目录中,这使得它提供给容器的 https://github.com/docker/kitematic/issues/1192
在默认情况下,机器只会将你的home目录。如果你想添加更多,你需要使用VirtualBox的UI添加它们。
https://github.com/docker/machine/issues/1814
I tried to mount folder of my project from /var/www to the same folder in container but folder in container is empty. Problem is maybe with host folder permissions because if i try that with some other folder it works.
This works:
docker run -it -v ~/Downloads:/var/www debian:jessie /bin/bash
This doesn't work:
docker run -it -v /var/www:/var/www debian:jessie /bin/bash
You cannot mount any folders outside your homedir ~/, this is the VM restriction on Mac and Windows. When the Virtualbox is created it mounts the folders within your Users directory, which makes it the only folder available to the containers https://github.com/docker/kitematic/issues/1192
By default, Machine will only share your home directory. If you want to add more, you need to add them using the VirtualBox UI. https://github.com/docker/machine/issues/1814
这篇关于泊坞窗安装OSX文件夹为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!