MongoDB无法从boot2docker写入docker中的本地数据库

基本上我想在os x上的ubuntu docker中运行meteor,并使用atom来编辑源代码。 所以我使用共享音量来实现这一点。

我使用virtualbox 4.3.30和boot2docker 1.71。

当它不在共享卷中时,meteor应用运行良好。 但如果我把它放在共享卷中,它说:

Unexpected mongo exit code 100. Restarting. Unexpected mongo exit code 100. Restarting. Unexpected mongo exit code 100. Restarting. Can't start Mongo server. MongoDB had an unspecified uncaught exception. This can be caused by MongoDB being unable to write to a local database. Check that you have permissions to write to .meteor/local. MongoDB does not support filesystems like NFS that do not allow file locking. 

我用来运行泊坞窗的命令是

 docker run -t -i -p 3000:3000 -v ~/Documents/myapp:/home/myapp -d ubuntu 

我的问题是我如何能让meteor应用程序在共享卷中成功运行mongodb?


我已经尝试过“meteor重置”,并删除.meteor中的锁文件,他们都没有工作。

问题是mongodb不支持共享NFS文件types。 boot2docker使用NFS。 您可以尝试使用虚拟框文件的共享, https://github.com/boot2docker/boot2docker#virtualbox-guest-additions中的说明。

另一种select是使用azk ,它是核心团队的一部分。 注意:现在只有Mac OS X和Linux