Docker "Mount a volume on the Container" for Mac OS X kinda works

I’m trying to understand how volumes work on the mac OS X with docker. I followed along with the installation example at: and everything works as it is written but there is something weird that the page doesn’t tell you (either that or I’m weird - a distinct possibility). The weirdness is that when you start up the NGINX and view your index.html it looks good, and then you create a new cool.html and then browse to it, it’s fine and looks good. But now, what happens when you change cool.html? That change is not reflected back in NGINX unless you totally stop and restart all the way down to the virtual box level.

This “feature” would make it next to impossible to use this in a dev, debug environment - every time I would need to make a change I’d have to reboot virtual box to see it.

What am I missing? Is this working as expected or is this unusual?

How can I work in a dev debug cycle with docker?



This is not a Docker problem. Its a problem when nginx is running on Virtualbox. So for this to work you will have to modify the docker image and change the option sendfile on to sendfile off.



Thank you for your help. That did work under windows, but under Mac it
still seems to be a problem for me. I think I’m getting closer to an answer
for the mac, but I’m not fully there yet. I think it has something to do
with needing to get boot2docker working and multiple filesystems, but I
don’t quite have it groked yet.




I am sure you will get it work on a Mac as I have tested this on my Mac with boot2docker before giving you the answer.