Allow shared folder path customization#78
Merged
legal90 merged 5 commits intoParallels:masterfrom Dec 23, 2018
Merged
Conversation
Adds a new CLI argument "--parallels-share-folder" which could be specified multiple times and allows to customize shared folder paths. The default is still the same: "/Users".
| mountCmd := "sudo mkdir -p " + mountPoint + " && sudo mount -t prl_fs " + shareName + " " + mountPoint | ||
| // Mount the shared folder | ||
| log.Infof("Mounting shared folder %q ...", mountPoint, mountPoint) | ||
| mountCmd := fmt.Sprintf("sudo mkdir -p %q && sudo mount -t prl_fs %q %q", mountPoint, shareName, mountPoint) |
Collaborator
There was a problem hiding this comment.
Why don't you use "share" option of prl_fs?
Collaborator
Author
There was a problem hiding this comment.
Hm... I'm not sure. It was always like that, without share mount option. Do you think we should use it? Won't it cause access issues for docker daemon or containers running in the VM?
Collaborator
There was a problem hiding this comment.
Well, I don't know. Ok, anyway this is not relevant for the pull request.
Use -t option to list mount points of the specified type
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new CLI argument
--parallels-share-folder, which could be specified multiple timesand allows to customize shared folder paths. The default is still the same:
/Users.New argument supports relative paths and spaces. Usage example:
The temporary binary built from this branch: docker-machine-driver-parallels-565d105.zip
As an addition - user can also add his own custom shared folders manually, via CLI or GUI. It will be mounted automatically after rebooting the VM with
docker-machine restart.Attention: As it was before with
/Users, the mount path on the guest side is the same as the path on your Mac which you passed to the--parallels-share-folderoption.E.q.
/Usersis mounted to the guest path/Users,/Library, if specified, will be mounted to the guest path/Libraryand so on.So, do not share such folders as
/bin,/etc,/usr,/varand other paths which overlap the existing directory structure of boot2docker Linux VM. That will cause the VM to stop working properly.P.s. The original implementation was discussed in #77