-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folders that are not relative to the Vagrantfile can not be mounted with docker -v #12
Comments
@carloslozano Thanks for pointing on this! config.vm.synced_folder ".", Dir.pwd boot2docker-vagrant-box/vagrantfile.tpl Line 12 in a95b7bf
That's why only children of . can be mounted to the Docker container.
I think, we should change this behavior and share the entire P.s. Limitations: we can not share the OS X root ( |
@carloslozano Please, try to add this line to your Vagrantfile, do config.vm.synced_folder "/Users", "/Users" Does it work for you now? |
@legal90 Thanks for your reply. 👍 I think it would be excellent if boot2docker-vagrant-box could emulate the behaviour of the boot2docker virtualbox as closely as possible. It would really facilitate the migration from virtualbox to parallels; I encountered the aforementioned issue during such a migration and couldn't find any reference anywhere to this behaviour/limitation. In the meantime, a note in the documentation with regard to the current caveats would be helpful to avoid others from falling over the same stone 😉 if I understand correctly, to share any sub-paths of As long as the access to the |
@legal90 I've just tried your recommendation. Added to Vagrantfile:
Testing:
Result:
This work-around works for all sub-paths of If I also want to share other sub-paths of, for example
Correct? Thanks! |
@carloslozano Yes, you're right. I'm gonna apply the same behavior to this vagrant box and add short notice to README.md. |
Fixed in v1.7.1 |
Problem
When using boot2docker-vagrant-box, sharing folders with docker [create|run] -v <local_folder>:<docker_folder> does not work if the <local_folder> path is not a sub-folder of the folder containing the Vagrantfile.
Steps to Reproduce
Expected Result
The command at the aforementioned step 3. lists the contents of the $HOME/shared folder mapped to /root/shared.
Actual Result
The command at the aforementioned step 3. yields no results, the folder is empty (not synched).
Environment
Work-around
If the shared folder is a sub-folder of /tmp/boot2docker (location of Vagrantfile), the share works correctly.
The text was updated successfully, but these errors were encountered: