Sharing code directory from host with boot2docker does not call inotify on guest

感情迁移 提交于 2019-12-08 17:05:26

问题


I am trying to setup a dev environment with boot2docker/Virtualbox. Sharing a folder on the host with the docker container works, but since it is shared through a Virtualbox shared folder inotify does not trigger inside the container (and the code is not reloaded).

Is there a way to get the source folder into a docker image with boot2docker that still triggers inotify in the container? I would rather not use polling, since using polling inside a Virtualbox share has a heavy CPU cost on the host.


回答1:


That is boot2docker limitation because of this double layers of indirection you have to go through one with Virtual box and another is with docker. Looks like you will be better off setting up your own Vagrant machine and use one of alternative methods to share the folders, either through NFS, RSYNC or Unison plugin mentioned in the comment above



来源:https://stackoverflow.com/questions/26956623/sharing-code-directory-from-host-with-boot2docker-does-not-call-inotify-on-guest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!