5 ms·
If I had a yearly quota on HN for upvotes, I'd use all of them on this. > Volume mounting for your code and data: volume data access works correctly, including
by tzaman 11y ago
If I had a yearly quota on HN for upvotes, I'd use all of them on this.
> Volume mounting for your code and data: volume data access works correctly, including file change notifications (on Mac inotify now works seamlessly inside containers for volume mounted directories). This enables edit/test cycles for “in container” development.
This (filesystem notifications) was one of the major drawbacks for using Docker on Mac for development and a long time prayer to development god before sleep. I managed to get it working with Dinghy (https://github.com/codekitchen/dinghy https://github.com/codekitchen/dinghy) but it still felt like a hack.
- avsm 11y agoWe'd love to get your feedback on the new filesystem engine in the Docker for Mac app. It's been a ton of work to get right, and there a few corner cases in the current beta that we're squashing, but overall things "just work" for my day-to-day Linux development on my Mac using the current beta. At this stage, pointing it to the weirdest and most wonderful filesystem stressers you can find is welcome. We'll leap on any issues you find...
- tzaman 11y agoWill do, I've signed up for the beta (same username as here)
- nevir 11y agoOne thing I'm immediately concerned about is having some way of "pausing" xhyve. Purely because of Android development :( Intel's HAXM doesn't (seem to?) play nice, and asks for an exclusive lock. See https://github.com/mist64/xhyve/issues/88 https://github.com/mist64/xhyve/issues/88 and https://code.google.com/p/android/issues/detail?id=197915 https://code.google.com/p/android/issues/detail?id=197915
- justincormack 11y agoYou can quit and restart (its very quick). There isn't a pause at present though.
- nevir 11y agoThat's probably good enough
- avsm 11y agoI haven't tried the Android emulator recently, but I am interested in deploying Facebook's Infer tool on our codebase (and they've got a Docker container too for it of course). So I've filed an internal bug for us to look into HAXM and figure out if it plays well with Docker for Mac/Windows. Thanks for the pointer!
- STRML 11y agoWhat is the filesystem engine? Is it just something fancy on top of NFS, or something completely new?
- shykes 11y agoIt's something new.
- ngrilly 11y agoIs it related to the work started by Brad Fitzpatrick a few months ago with the goal of implementing client-server gateway between the host and the guest filesystem using FUSE?
- avsm 11y agoThe new daemon (dubbed osxfs) is FUSE-based at the moment, but also provides a semantic translation layer between OSX filesystem calls and Linux kernel events. The FUSE layer can be removed in the future in favour of a direct kernel module with this architecture, if it ends up being a bottleneck (its fine right now though)
- ngrilly 11y agoDo you use a custom protocol between the daemon running in OSX and the one running in the container? Is there some kind of caching? If yes, what is the impact on tools like make when checking atime or mtime? If no, is there a perceptible impact on latency, for example when compiling a large project in the container?
- hinkley 11y agoI gotta say I've had about all the VirtualBox I can take in this lifetime. It's caused me pretty dire file handling problems on 3 projects and only 2 of those had any Docker in them. Thanks for working on this. I have an open bug against docker-compose (docker doesn't do the same thing by itself) where the wrong layers are being used, but only on virtualbox. Hopefully this will solve that problem, as well as how to make my dev and prod database handling more homogenous. And I can finally turn sendfile back on in my nginx configs without having to special case anything for dev!
- lobster_johnson 11y agoIs this using the normal VirtualBox "shared folders" functionality? For Vagrant we had to drop VirtualBox in favour of VMware Fusion because VirtualBox suffered cache corruption almost every day. You would write a file on the host, and the file would be corrupt inside the VM. Last I checked, this bug was still open, but I'm not certain (on my phone right now), but it still makes me wary of using VirtualBox again. Have you dealt with this issue at all? Edit: Or is this not using any VirtualBox code at all?
- justincormack 11y agoNo it does not use any virtualbox code.
- dancompton 11y agoI really appreciate you guys working on that. I have since moved to a debian VM, but might eventually move back if I don't need to frequently restart docker machine hosts.
- ngrilly 11y agoWhat is the performance of this new filesystem engine, compared to VirtualBox shared folders, which are well-known to be slow?
- so0k 11y agoI've been running Docker on Hyper-V since the start (VBox never worked for me as I had a requirement on Hyper-V) - can you provide a little more info on how unikernel experience was used to make a difference? Is this a custom compiled linux kernel with Alpine distro on top? How would volume mounts compare to something like using the netshare (cifs) with a samba share from the windows host? (which is what I'm currently using)?
- Artemis2 11y agoThis is huge! We had a lot of trouble getting fs notifications working in containers, especially for hot-reloading of code. Our solution was to create a custom fs watcher that would look for changes in the content of the files (it's only code, and for development, so speed doesn't matter much). I have been looking to replace this with something cleaner (at least with something like Dinghy and actual filesystem events), but Docker for Mac is likely the way we'll go.
- beaker52 11y agoYou should check out Dlite (which is an alternative to Dinghy) has been around for a few months: https://github.com/nlf/dlite https://github.com/nlf/dlite It's been a much more friendly (read: plugin and play) than dinghy.
- amirmc 11y agoAs mentioned in another comment here [1], we've been in touch with the author of dlite during this beta. His feedback was very useful! [1] https://news.ycombinator.com/item?id=11352621 https://news.ycombinator.com/item?id=11352621
- trendnet 11y agoDoes it mean no `VBox shares` mmap bug limiting the use of volumes in Cassandra and MongoDB containers?
- avsm 11y agoYes that should work fine with osxfs (the new filesystem engine). Do you have a pointer to the specific bug in vbox so we can add it to our test suite?
- trendnet 11y agoHere [1], under "WARNING (Windows & OS X)", there're several links to bug reports on VBox and Mongo trackers. [1] https://hub.docker.com/_/mongo https://hub.docker.com/_/mongo
- deleted 11y ago[deleted]
- jnardiello 11y agoHere is the catch: you just need to realise that docker-machine is really just a virtual box linux machine. Once you get that, having shared volumes working as expected is quite easy without requiring 3rd party tools. I'm actually quite concerned on how this is going to change with this new tools, if they introduced "more magic" it could mean to lose control on your local environments.
- alfonsodev 11y agoIn my comment I wanted to express the same, the whole Boot2docker solution seem too hacky for non Docker enthusiastic devs. I had hard time trying to convincing co-workers to use docker for development environment, mainly because filesystem, and the user experience. You have to really like docker to go thru all the setup. I did it but I can see why my coworkers didn't.
- matt_wulfeck 11y agoAgreed. We gave up on it and created a local beefy server that we shared for docker testing, but then we have port collisions and the other problems that come along with sharing. Native is better and I'm very excited for this.
- shlant 11y agoAnywhere I see Docker on Mac mentioned, I always point people to Dinghy. It has solved a lot of the issues the vanilla solutions had (NFS, fsevents etc) and the maintainer is incredibly responsive. I would love to see Docker come up with something that rivals Dinghy as I would prefer not to have to use a third party tool, but considering their reputation for stability and the comments being made about xhyve, I am happy to continue using (and gushing about) Dinghy for the foreseeable future.