Skip to content
This repository has been archived by the owner on Jan 1, 2021. It is now read-only.

[Q] Why Boot2docker on Windows automount the Shared folders but this not seem to happen on Mac? #1133

Open
alexandrev opened this issue Feb 6, 2016 · 4 comments
Labels
question Usability question, not directly related to an error with Boot2Docker

Comments

@alexandrev
Copy link

I've been working on a PR for Kitematic, as you can see here: docker/kitematic#1202 about allowing to mount volumes on other directories not only on User's directory. But, we got stuck at some strange behavior I'm going to explain and I need to know if someone can explain why this is happening.

On Windows host: when I add a folder to the shared folders on Virtualbox boot2docker machine and I use that shared folder on a container as a volume the boot2docker machine automatically (automagically?) mount the folder as you can see here:

image

image

But this behavior that's not be the same on Mac. Is there any reason to this different behavior on Windows host and MacOS host? Is it something related to the boot2docker machine? What is the supposed expected behaviour the one on Windows or the one on Mac?

Thanks for your help and sorry to have to open an issue to raise this question.

Best regards,

@tiptronic
Copy link

Same thing here: the add/change/remove buttons are missing and there seems to be no way to add a directory/share/volume on the Mac. (As a side-note: this functionality does exist on my Synology NAS as well)

@alexandrev
Copy link
Author

We are solving the issue from Kitematic as you can see docker/kitematic#1202 but I think it should be taken care of from Boot2Docker as well. Please, take a look!

@im-evo
Copy link

im-evo commented Mar 2, 2016

I would like to describe the problem in another words.
When user adds a shared folder in virtualbox it doesn't automatically mount within boot2docker machine. Instead, manual mount is required. This definitely happens on OSX, I'm not sure about other OS'es
Is this the intended behaviour or a bug?
Thanks
CC: @SvenDowideit @tianon

@darrellenns
Copy link

See the excerpt below from /etc/rc.d/vbox. It only mounts the /Users or /c/Users folders. The note regarding VBoxService not working doesn't appear to apply anymore. I was able to get it to automount virtualbox shared folders as follows:

  • create vboxsf user and group (it seems like VBoxService is hardcoded to mount as this user/group)
  • add docker user to vboxsf group (so it has permissions to access the mounts)
  • run VBoxService --only-automount

Excerpt from /etc/rc.d/vbox:

    # bfirsh gets all the credit for this hacky workaround :)
    try_mount_share /Users 'Users' \
            || try_mount_share /Users \
            || try_mount_share /c/Users 'c/Users' \
            || try_mount_share /c/Users \
            || try_mount_share /c/Users 'c:/Users' \
            || true
    # TODO replace this whole hacky bit with VBoxService --only-automount
    # (the problem with that being that we can't run VBoxService because the
    #  32bit VBoxService won't work with the 64bit kernel modules, but the 64bit
    #  VBoxService won't work with our 32bit userspace; good times)

@wglambert wglambert added the question Usability question, not directly related to an error with Boot2Docker label Jul 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Usability question, not directly related to an error with Boot2Docker
Projects
None yet
Development

No branches or pull requests

5 participants