-
Notifications
You must be signed in to change notification settings - Fork 121
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
Preferences UI resolves symlinks in shared paths, but docker run -v doesn't #1298
Comments
Hi @barisione, this feature is indeed confusing when it comes to exporting symlinks. The basic idea is that the command line that you invoke is exactly the command line that the I have marked this issue as related to the GUI, bind mounts, and documentation as I think we could make the functionality I describe above much clearer. I'd be interested in hearing from you about what would help to discover this functionality or how the behavior could be changed to make it more intuitive. The primary constraint we have is that |
For me it's not a big problem, I just need to resolve the symlink before passing it to docker. |
@dsheets It took me a couple reads to understand what you were saying about the blank line selection, and you are right – it's definitely not obvious. After understanding what I needed to do, it did solve my problem though. Thanks! 😄 Since you were looking for suggestions about how to make the behaviour more intuitive, here's one – would it be possible to make the default way of adding paths to the File Sharing Preference pane be the "blank line" method? That is, when a user clicks the + to add a new path, they are given a new blank line with a cursor where they can type in their path, (in the above case, Since Docker users have to use the CLI extensively anyway, I would think that this way would be more intuitive for most of them. The current way, where clicking the + puts you into a Finder selection pane(?) could perhaps be retained through an alternate method, like a folder icon or something. [Caveat: I have no idea how difficult any of this would be, and my suggestion might reflect that.] |
Issues go stale after 90d of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Description:
docker run
(on macOS Sierra) doesn't resolve symlinks passed with-v
, so it complains that the path is not mountable.The Preferences UI does resolve symlinks so you cannot add the directory that failed mounting to your list of allowed directories.
Note that I initially reported this on the generic docker tracker as I thought that the Preferences UI was reasonable.
Steps to reproduce the issue:
/var
is a symlink to/private/var
on macOS (this is the normal behaviour)./private
in the list of directories which can be mounted (Docker... -> Preferences -> File Sharing).docker run -v /var/folders/foo:/foo true
./var/folders/foo
not being shared./var/folders/foo
to the list of shared folders.Describe the results you received:
When doing docker run:
When trying to add the path in the preferences:
Describe the results you expected:
I would expect either docker run to cope with symlinks by resolving them or the preferences dialog to allow adding paths with symlinks.
Output of
docker version
:Output of
docker info
:The text was updated successfully, but these errors were encountered: