11

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.

Andreas Arnold
  • 519
  • 5
  • 11
  • Maybe https://github.com/dmatora/vagrant-unison – Alex Nauda Feb 02 '15 at 22:01
  • inotify events do fire as expected under Linux, but not with `boot2docker`. :( Hopefully, the Docker devs are watching! – 425nesp May 18 '15 at 06:34
  • I've decided to do it the other way, and put all the source code inside a docker container. By doing this, inotify should fire, but also, all changes to the source code are available inside any linked containers instantly. See my project here: http://dockershell.io/ – mzedeler Jun 28 '15 at 20:49

1 Answers1

0

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

Vlad
  • 8,407
  • 4
  • 39
  • 60