MongoDB requires a filesystem that supports fsync() on directories.įor example, HGFS and Virtual Box’s shared folders do not support this So the actual solution would be to try a DVC: Data Volume Container, because right now the mongodb doc mentions: mongod crashes due to filesystem type not being supported (mmap not working on vboxsf) $ sudo mount -t vboxsf -o uid=999,gid=999 Users /Usersīut. Nevertheless, I managed to hack the ownership, remounting the /Users shared volume inside boot2docker to uid 999 and gid 999 (which are what mongo docker image uses) and got it to start: $ boot2docker ssh It's a file ownership/permission issue (not related to this docker image), either using boot2docker with VB or a vagrant box with VB. Unable to create/open lock file: /data/db/mongod.lock See also if specifying the full path for the volume would help: docker run -p 27017:27017 -v /home//data:/data/db. Try and check docker logs to see what was going on when the container stopped and go in "Existed" mode. If I do not set data volume, mongo image can work!īut, when setting data volume, it can't. Try to run "mongo" -failed kerydeMacBook-Pro:~ hu$ docker exec -it f57 bashĮrror response from daemon: Container f57 is not runningĭocker inspect mongo kerydeMacBook-Pro:~ hu$ docker inspect mongo so - kerydeMacBook-Pro:~ hu$ docker run -p 27017:27017 -v ~/data:/data/db -name mongo -d mongoį570073fa3104a54a54f39dbbd900a7c9f74938e2e0f3f731ec8a3140a418c43ĭocker ps - no daemon mongo kerydeMacBook-Pro:~ hu$ docker psĬONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES Ubuntu latest 6cc0fc2a5ee3 3 weeks ago 187.9 MB ![]() ![]() Mongo latest b11eedbc330f 2 weeks ago 317.4 MB REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE It has mongo:latest images kerydeMacBook-Pro:~ hu$ docker images I want to use Dockerizing MongoDB and store data in local volume.
0 Comments
Leave a Reply. |