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

The junction created by powershell when building a docker image points to nothing #12240

Closed
xiangfan-ms opened this issue Oct 4, 2021 · 2 comments

Comments

@xiangfan-ms
Copy link

  • [ x ] I have tried with the latest version of Docker Desktop
  • [ x ] I have tried disabling enabled experimental features
  • [ x ] I have uploaded Diagnostics
  • Diagnostics ID: E9449031-6CD9-4DCC-BDF4-7BB4E9D2866E/20211004173625

Actual behavior

The junction created by 'powershell New-Item -ItemType Junction' when building a docker image points to nothing
In contrast:
The junction created by 'mklink /J' when building a docker image works
The junction created by 'powershell New-Item -ItemType Junction' in the running container works

Expected behavior

The junction should point to the target location

Information

  • Windows Version: 10.0.19043.1237
  • Docker Desktop Version: 4.0.0 (67817)
  • WSL2 or Hyper-V backend? WSL2
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM: No

Steps to reproduce the behavior

  1. On the hosting machine: docker build -t test .

Dockerfile

FROM mcr.microsoft.com/windows/servercore:ltsc2019
RUN mkdir test
RUN mklink /J sym1 C:\test
RUN mklink /J sym2 \\?\C:\test
RUN powershell New-Item -ItemType Junction -Path C:\sym3 -Value C:\test
RUN dir

Output

<JUNCTION>     sym1 [C:\test]
<JUNCTION>     sym2 [\\?\C:\test]
<JUNCTION>     sym3 []
  1. On the hosting machine: docker run -it test cmd.exe
  2. In the running container: dir
<JUNCTION>     sym1 [C:\test]
<JUNCTION>     sym2 [\\?\C:\test]
<JUNCTION>     sym3 []
  1. In the running container: powershell New-Item -ItemType Junction -Path C:\sym4 -Value C:\test
  2. In the running container: dir
<JUNCTION>     sym4 [\??\C:\test]
@docker-robott
Copy link
Collaborator

Issues go stale after 90 days of inactivity.
Mark the issue as fresh with /remove-lifecycle stale comment.
Stale issues will be closed after an additional 30 days 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

@docker-robott
Copy link
Collaborator

Closed issues are locked after 30 days of inactivity.
This helps our team focus on active issues.

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

@docker docker locked and limited conversation to collaborators Mar 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants