-
Notifications
You must be signed in to change notification settings - Fork 2k
Shared folders should be configurable for local VM drivers #13
Comments
I'm curious how you envision the future of this shaping up. A I've been thinking a little about this and since we have been hitting huge performance issues with VBox shared folders supporting at least a minimal NFS driver (possibly SSHFS / samba too ala the spirit of boot2docker/boot2docker-cli#247) would be a good direction. Obligatory link to Mitchell's article which is a good treatise on why this would be useful. Short story: NFS could probably give us ~30 times better read performance than shared folders (and mostly read performance matters for our needs). I'm in favor of something like |
+1 |
👍 on NFS share. We have experienced very bad performance with shared folder even with vmware fusion. The only tricky part with we have found is that NFS sometimes doesn't bust a cache properly -> need to change file again for machine to pickup changes. |
rsync or nfs would be awesome 👍 |
Cannot upvote this enough... would LOVE to see this added to machine! 👍 |
+1 |
1 similar comment
+1 |
+1 |
+1 This is the only thing holding me back from rolling toolbox out as a development environment solution for our developers. I have a hacked-together setup similar to docker toolbox that utilizes nfs specifically because vboxfs gives permissions and performance issues. |
+1 |
1 similar comment
👍 |
I just filed Parallels/docker-machine-parallels#29, but I believe Boot2Docker is able to support mounting NFS volumes by itself, which suggests enabling such volumes could be handled in a driver-agnostic way (see, e.g., boot2docker/boot2docker#581 (comment)). I'm imagining something like: % docker-machine create --help
...
--share-type "driver" "driver" or "nfs[:<mount_options>]" where
<mount_options> are optional NFS options,
such as "mapall=501:501,nolock,sync"
... Then you could do something like: % docker-machine create --driver ... --share-type "nfs:mapall=$( id -u ):$( id -g )" ...
|
From @legal90 via this Parallels/docker-machine-parallels#29 (comment) related to my above proposal:
|
+1 |
1 similar comment
+1 |
+1 - If /Users is mounted by default and is larger than my virtual machine's disk size, wouldn't this cause problems? I am wondering because I use github.com/adlogix/docker-machine-nfs to share large projects like a Magento project. I have a work machine and a personal laptop - the work machine has virtually nothing in /Users and I am able to mount the NFS, but the mount always fails when I try to mount to NFS using my laptop (with large /Users directory) When I use github.com/codekitchen/dinghy I do not have this problem, because it is mounting only the volume specified in docker-compose. @nathanleclaire IMO, the file sharing and volumes and mounting is a HUGE blocker for docker (no pun intended) and we should have a choice of how we mount volumes and what is actually mounted. Otherwise we have to use these workarounds to develop projects with giant file structures. For instance, I can't docker-compose up a development Magento project with 30,000 files because the volumes aren't available in time and cause everything to break. So we have to try these side projects for NFS... Then again, I am new at this but I see SO MANY issues resulting from file shares.. |
+1 |
If it helps anybody, I'm using the new https://github.com/rawkode/symfony-distribution/blob/master/bin/osx-sync We should be able to do |
Does it give you an error message specifically indicating that this is the problem? Have you tried doing the NFS mount manually? |
+1 |
Has there been any movement on this? It would be great to see something like --share-type with options for NFS, sshfs, rsync, samba, etc. and (maybe?) --share-path src:dest implemented. |
I use VMware Fusion (not VirtualBox) which has much more performant file sharing. However, I still need to share directories other than |
I've been struggling to mount something else than default
So in your It's important to set it up under 'Machine Folders' not under 'Transient Folders' in order to make it work. |
@jakub-c, thanks for the VBox-specific work-around, but I don't think that's the point of this issue. As far as I understand, this is a feature request to abstract (or at least expose) each underlying drivers' shared folder mounting options through the |
Just getting started with Docker (from the Vagrant world) and this has been my biggest pain point. An easy and intuitive way to sync a host directory (from OSX) all the way down to the web root in the container would be HUGE. |
@agentfitz for OSX there is dinghy project |
@fesor Thanks! Hey, last night I realized I had totally missed something. Since /Users is automatically mapped from OSX to the docker-machine (if I'm not mistaken), then setting up your synced volume from your host OSX all the way down into the docker container is as simple as targeting a specific directory from within /Users for your mapping, so:
I actually got this working last night after a hidden tip on Stackoverflow. Is this clearly laid out in the Docker docs somewhere? Also, considering how easy this is (once you know how it works), why do all these other syncing projects exist? |
@agentfitz because VirtualBox is terribly slow at sharing folders from OSX into the VM. Even VMware, which is much faster, is still supposedly not as fast as NFS (which |
https://github.com/adlogix/docker-machine-nfs is by far the most simple solution and my favourite. |
@mrmachine ah, so are you saying the -v flag to the docker run command uses VirtualBox's built in syncing under the hood? What is the "syncing technology" it uses? I do remember reading about performance concerns but when I set it up last night source code changes seemed to be reflected in the docker container instantly. Is it an issue with bigger files (like images or something?) as opposed to source code? Thank you for your response! I also hadn't considered the permissions issues, so thanks for pointing those out. @vipconsult thanks for sharing, I'll check it out. But seriously though, where are the official dockers docs on all this? |
VirtualBox shared folders -- they work fine for simple use cases, but with large files and/or lots of reads and writes their performance is not ideal. |
@agentfitz For me the performance issues are huge as I use SQLite-databases. I am also using the script mentioned by vipconsult since some months, it works really well. |
+1 for adding more driver options for sharing folders. would be great to see this added to docker-machine. |
+1 |
bump... |
A method recommended by @jas99 worked for me. |
+1 |
+1 |
+1 to having the ability to configure shared folders outside the default |
This could mean a lot of different things, but FWIW, it'll be possible in 0.9.0 thanks to @u-foka ! |
Nice! Thanks @nathanleclaire and @u-foka! 🚀 Breaking down what I said above:
To:
That means having the ability to allow docker to see the following (note there are multiple folders, not just an "alternative" like the initial comment in #1826 says):
|
going to close this issue in favor of more specific ones. "should be configurable" is overly broad. thanks all! |
No description provided.
The text was updated successfully, but these errors were encountered: