Q:

MongoDB is unable to write to a local database in docker from boot2docker

Basically I'd like to run meteor in a ubuntu docker on os x, and use atom to edit the source code. So I use shared volume to achieve this.
I use virtualbox 4.3.30 and boot2docker 1.71.
The meteor app runs well when it's NOT in the shared volume.
But if I put it in the shared volume, it says:
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.

The command I use to run the docker is 
docker run -t -i -p 3000:3000 -v ~/Documents/myapp:/home/myapp -d ubuntu

My question is how I can have the meteor app run mongodb successfully in the shared volume?

I have tried 'meteor reset' and remove the lock file in .meteor, none of them work.

A:

The problem is that the mongodb does not support share NFS file type. The boot2docker uses NFS. You can try to use the share of the virtual box files, instructions in https://github.com/boot2docker/boot2docker#virtualbox-guest-additions.
Another alternative would be to use the azk, which make part of the core team.
Note: For now only Mac OS X and Linux

