-
Notifications
You must be signed in to change notification settings - Fork 343
Description
In docker_entrypoint.sh
, this image will exec chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
to change the ownership of the mounted data folder.
But when I use boot2docker to run this image, I got an error as following:
[2015-05-14 22:02:10,344][INFO ][node ] [Her] version[1.5.2], pid[40], build[62ff986/2015-04-27T09:21:06Z]
[2015-05-14 22:02:10,345][INFO ][node ] [Her] initializing ...
[2015-05-14 22:02:10,356][INFO ][plugins ] [Her] loaded [marvel], sites [marvel]
{1.5.2}: Initialization Failed ...
- ElasticsearchIllegalStateException[Failed to created node environment]
AccessDeniedException[/usr/share/elasticsearch/data/elasticsearch]
This is because boot2docker uses vboxfs to share the files between Host Mac and the VM that actually runs docker, and VM cannot change the permission or ownership of the folders on Host Mac.
One workaround is to create the data folder inside the VM, and mount that folder on the container.
I guess using data container might also works, but haven't tried it, and even if it works, it might still have some performance issues.