boot2docker / osx-installer

Docker installer for Mac OS X
Apache License 2.0
1.25k stars 258 forks source link

Container with host mounted volume serving corrupt files #100

Closed geekgonecrazy closed 6 years ago

geekgonecrazy commented 9 years ago

Running the latest version of OSX and latest boot2docker.

I've got a container with nginx / php-fpm serving up files. In the development environment (boot2docker) i've got my local source code folder bound / mounted to the container.

All that's fine. But i've got several js files that on being served are all truncated and funky. As in like at the last line of the file it'll wrap and start outputting another file. Other files it'll just chop off a random amount.

I've checked the actual files and they are fine. I've also built the container putting the current files inside and ran it. The files are fine. So seems to be something with the mount...

Searched through the issues, didn't find any matching this. New issue? Known? Suggestions?

Thanks,

Aaron

SvenDowideit commented 9 years ago

@tianon @bfirsh ?

shirk3y commented 9 years ago

+1 The same issue here.

shirk3y commented 9 years ago

This can be related: https://forums.virtualbox.org/viewtopic.php?f=3&t=24905

shirk3y commented 9 years ago

Or this: https://github.com/noplay/docker-osx/issues/68

shirk3y commented 9 years ago

In fact, adding sendfile off; at location tag fixed it.

abesto commented 9 years ago

+1 same here. Confirming, sendfile off in the location section seems to fix the issue.

geekgonecrazy commented 9 years ago

That does the trick.. But why? When not mounting a volume it works.

Interesting.

yeliu84 commented 8 years ago

+1 sendfile off solved this issue, thank you all!

tianon commented 6 years ago

Sorry, this repository is long-since deprecated in favor of Docker Toolbox (whose usage is now also discouraged in favor of Docker for Windows and Docker for Mac).