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

Build Failure unable to prepare context: unable to evaluate symlinks in context path #235

Closed
ericwj opened this issue Feb 5, 2020 · 1 comment
Labels

Comments

@ericwj
Copy link

ericwj commented Feb 5, 2020

Either Visual Studio or Docker is unable to resolve paths to my source repo because it is on a VHDX and my Source folder is a symlink to a folder named Source on that virtual disk.

Note that it is conveniently assumed that this error is non-critical, although apart from pulling base images the build didn't do anything noticeable so this error is critical.

After doing Add Docker Support and running a build, I get the following error.

========== Warming up container(s) for ProjectName ==========
Starting up container(s)...

docker build 
-f "C:\Users\Eric\Source\ProjectName\src\ProjectName\Dockerfile"
--force-rm -t projectname:dev --target base 
--label "com.microsoft.created-by=visual-studio"
--label "com.microsoft.visual-studio.project-name=ProjectName" 
"C:\Users\Eric\Source\ProjectName" 

unable to prepare context: unable to evaluate symlinks in context path:
CreateFile C:\Users\Eric\Volume{012345678-0123-0123-0123-0123456789abc}: 
The system cannot find the file specified.

A non-critical error occurred while getting the container(s) ready. Your project(s) will continue to function normally. The error was: Docker command failed with exit code 1.
unable to prepare context: unable to evaluate symlinks in context path:
CreateFile C:\Users\Eric\Volume{012345678-0123-0123-0123-0123456789abc}: The system cannot find the file specified.

Relevant PowerShell commands will yield:

PS> dir C:\Users\Eric

    Directory: C:\Users\Eric

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
l----           5/16/2018  1:45 AM                Source -> Volume{012345678-0123-0123-0123-0123456789abc}\Source

I know for a fact Docker doesn't handle a very similar situation either since I wanted to put the data-root path on a Storage Spaces virtual disk on Windows Server 2019 linked to a directory on C: and that also produced errors on docker pull.

@dbreshears
Copy link
Member

Closing as this is external to Docker

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

No branches or pull requests

2 participants