-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Windows Containers - Symlink commands result in Access denied #37024
Comments
Thanks @jasonbivins for the attention. |
I believe I have also run into this problem, but I feel a bit over my head and can't fully parse through all the layers of errors to be sure. A lot of stuff seems to just silently die off. It's like the stack traces don't always get fully propagated, perhaps people didn't code for the "no sym link support" edge case. I'm also confused how such a seemingly large bug could have so little attention and others experiencing it. In my experience so far, if you're the only one having a problem the issue is you, not the code. So I really want to say that I just have some incorrect configuration, but the test above seems to pretty definitively demonstrate the issue. Thus, at minimum, I also can confirm that on win 10 1803, using the latest 1803 and 1709 windowservercore images, I can reproduce the access denied error with the trivial example above. Interestingly, when I ran a linux container on the same windows host I was able to run something like Does this high level failure seem reasonable from this low level bug? If so, is there anything I can do to help address the issue? Finally, are the any recommended temporary work-arounds? |
Same here ... |
I can still reproduce with 1903 (#38220 (comment)). |
This issue is making the use of CI in Windows docker container quite painful. We are using Gitlab Runner with docker-windows executor, which mounts a volume containing our source repository in the CI windows container. As it is impossible to create symlink, Flutter and Bazel can't run properly in the mounted source directory and we are forced to copy the whole source tree out of it before building anything. A second issue, is that we can't use the caching mechanism for the same reason (mounted volume), which makes all our CI jobs extremely slow. |
IIUC, this problem occurs when running containers with Hyper-V isolation (not with process isolation?); there's some mention of this in microsoft/Windows-Containers#117, and a related (possible duplicate) in #40125. From reading those, it looks like this is not a bug/issue in Docker but a limitation in Windows (or the base image / host combination). @kevpar @katiewasnothere any ideas if there's workarounds for this, or if it's possible to fix this in Windows? |
Agree with @skeptic-monkey. We also use bazel build inside docker image toolchain. Inability to create symlinks blocks bazel build inside host folder. And we have to copy docker local build folder to host machine which is painfully slow. |
@StriderAJR , @skeptic-monkey , FYI - you can prevent Bazel from generating symlinks by passing the |
Yes, I use flag --experimental_convenience_symlinks=ignore
I suppose that you ran container on Windows Server host machine? Because
the problem exists only when running Windows Server image on Windows
Desktop host machine.
пн, 11 июл. 2022 г., 13:04 jheaff1 ***@***.***>:
… @StriderAJR <https://github.com/StriderAJR> , @skeptic-monkey
<https://github.com/skeptic-monkey> , FYI - you can prevent Bazel from
generating symlinks by passing the
--experimental_convenience_symlinks=ignore argument to bazel. I can
successfully build an application using bazel within a mounted host folder
—
Reply to this email directly, view it on GitHub
<#37024 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPZK4ZYYXONL5T4663MNKDVTPIRTANCNFSM4E7C5RAQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Nope I ran a container based on |
I think (per the earlier comments) it depends on wether or not Hyper-V isolation is used, which may be needed if the container's base-image is built for a different / non-matching Windows kernel. |
Yep I was running under hyper-v isolation and Bazel initially failed due to the fact it couldn’t create a symlink. |
I can repro this issue still. Would be great to get a fix. Host: Windows 11 Pro Output of
I have tried |
Description
Access denied when interacting with Symlinks inside windows containers
Steps to reproduce the issue:
1.start a windows container with a volume mounted
docker run -it -v C:\app:C:\app microsoft/nanoserver-insider
cd to the C:\app folder
mklink mylink file.txt
Access is Denied
Output of
docker version
:Output of
docker info
:Originally reported here for the insider preview versions, but I can repro in Server 2016 LTSB and in 1709
docker/for-win#1997
The text was updated successfully, but these errors were encountered: