5 ms·
Docker still has a long way to go in terms of local development ergonomics. Recently, I finally had my chance to on board a bunch of new devs and have them crea
by ahallock 9y ago
Docker still has a long way to go in terms of local development ergonomics. Recently, I finally had my chance to on board a bunch of new devs and have them create their local environment using Docker Compose (we're working on a pretty standard Rails application).
We were able to get the environments set up and the app running, but the networking is so slow to be pretty much unusable. Something is wrong with syncing the FS between docker and the host OS. We were using the latest Docker for Mac. If the out of the box experience is this bad, it's unsuitable for local development. I was actually embarrassed.
- aaronds 9y agoHave you tried https://github.com/EugenMayer/docker-sync https://github.com/EugenMayer/docker-sync ? I've had slow FS issues with docker on mac. Integrating docker-sync doesn't take long and should help you out.
- ahallock 9y agoI haven't, but I recommended it to one of the devs and he claimed it 'crashed' docker. Need more investigation, but we shouldn't need tools like this; it should work by default.
- aaronds 9y agoAgreed, and to my knowledge this is a known issue (I'm sure I've seen chatter regarding the problem on the docker forums/github). Nonetheless, with docker-sync I've been able to leverage all the benefits of docker-compose whilest mitigating those slow mounted fs issues, so for now I'm happy with it. At least you can configure it directly into your compose set up, so you don't need to spend time explaining it immediately when onboarding those new developers.
- ahallock 9y agoA few things to note: I wasn't using Docker for Mac, but a custom VirtualBox setup that took over a month to perfect. When I last tested Docker for Mac, the networking was really slow then, but I took a gamble that it had been fixed by now. I will give credit as to how easy it was to get the app running -- compose makes everything a snap. It's unfortunate that something is amiss with volumes/networking.
- shykes 9y agoDocker for Mac has a default filesystem configuration that offers maximum consistency at the expense of performance. Unfortunately in some configurations that can result in "throw computer out the window" frustration, depending on the I/O pattern of your project. As of Docker 17.06, 90% of use cases can safely change the settings and noticeably improve performance. See the documentation: https://docs.docker.com/docker-for-mac/osxfs-caching/#performance-implications-of-host-container-file-system-consistency https://docs.docker.com/docker-for-mac/osxfs-caching/#perfor...
- Rapzid 9y agoLinux is by far the best docker experience. I've experienced the same pains as you and possibly more supporting devs on OSX. The osxfs excuses are all a bit hand wavy and the new cached stuff kludgy IMHO. NFS is supposedly much faster, https://github.com/IFSight/d4m-nfs https://github.com/IFSight/d4m-nfs, but has no notification facilities. Apple, for their part, are way behind the curve on all this. Completely MIA. For the amount of developer dev-station share they have it's amazing what macOS users have to deal with.
- lozenge 9y agoYou should try dinghy. It replaces the default sync with a local NFS server and forwards fsevents. (I disabled its other features) https://github.com/codekitchen/dinghy https://github.com/codekitchen/dinghy