Skip to content
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

🔗 Support container created symlinks compatibility with Windows host WSL/Bash.exe #2743

Open
safizn opened this issue Oct 15, 2018 · 11 comments

Comments

@safizn
Copy link

safizn commented Oct 15, 2018

Hi, I think the limitation is documented somewhat but not elaborated well. And no plans for fixing it seems to exist. Hoping to get clear answers, not references to other issues. Thanks

Issue:

Soft symbolic links created inside Docker containers appear as text files on Windows host machine (either using WSL or Cygwin Bash.exe).
Although the other way around, where symlinks created on the Windows host machine, works inside Docker containers without any issue.

Re-creating the issue

  • Run Docker cotnainer with a volume to the host machine.
  • Inside Docker cotaniner: ln -s /<volumePath>/file /<volumePath>/file.symlink or create relative symlink cd /<volumePath>; ln -s ./file ./file.symlink
  • Inside Docker cotaniner: Woking symlink ✔
  • On the host machine WSL or Bash.exe: cat /<volumeHostPath>/file.symlink
    Results in: Symlink file interpreted as text format ❌

Own conclusions:

It appears that Docker uses special symbolic link files that are interpreted only using mfsymlinks option with the newer file sharing protocol SMB 3 between the host machine and the container filesystem. Windows on the other hand doesn't seem to interpret the symlink file format used by Docker (I think its this format), although Windows have a very good support for different symbolic link types.

Use case:

  • Installing node_modules/.bin symlinks in the container, and running .bin Node modules from the host machine (e.g. on Windows Sybsystem for Linux)

Questions:

To be honest I've read a lot of related issues/discussions (Some referenced below), and didn't reach a clear conclusion.

  • Where is the source of the issue ? Is it on the Docker side or Windows symlinks implementation ?
  • Will it be supported or is it being worked on ?
  • Will switching to Linux development setup fix the inconsistencies with symlinks between host machine and containers ?
  • Any workarounds ?

Versions:

  • Windows 10 Pro 1803, OS build 17134.345, Developer mode turned on.
  • WSL Debian GNU/Linux 9.5 (stretch)
  • Docker for Windows 2.0.0.0-beta1-win75 (19925) edge 915f68b
  • MobyLinuxVM kernel 4.9.125-linuxkit
  • Docker Engine: 18.09.0-ce-beta1
  • Container - any Linux container.
  • Hyper-V VM Ubuntu 18.04.1
@lephyrus
Copy link

lephyrus commented Nov 9, 2018

I'm experiencing this issue, and I'd just like to add that using WSL or bash.exe seems to be irrelevant - plain Windows Explorer sees a symlink created in the described manner (from container, on host-bound volume) as a text file which looks something like this:

XSym
0009
2caac42201001e0011242359b7af1986
<link target here>

My use case is very similar to @myuseringithub's: Installing a Yarn workspace (i.e. npm packages) from a container and having the generated links between the projects work from the perspective of an IDE running on the host (mainly so Typescript can resolve cross-project imports).

@docker-robott
Copy link
Collaborator

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

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.
/lifecycle stale

@ChipWolf
Copy link

/remove-lifecycle stale

@rfay
Copy link
Contributor

rfay commented Feb 15, 2019

/lifecycle frozen

@reduardo7
Copy link

Any update?

@idubinets
Copy link

I have the same issue

@Cytomax55
Copy link

after wasting 2 days i decided to look at logs and just realized that ln doesnt work using smb share..... any idea for a fix in the future?

@gety9
Copy link

gety9 commented Jun 10, 2019

Same issue, any work around ?

@jeremyml
Copy link

jeremyml commented Aug 8, 2019

So frustrating

@MathiasWeisheit
Copy link

I there any upate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests