Skip to content

TP4 docker client doesn't like My Music #18120

Closed

Description

@StefanScherer

Description of problem:

The TP4 docker client seems to have problems with folders with blanks in it or with the user's document sub folders.

docker version:

PS C:\Users\vagrant\Documents> docker version
Client:
 Version:      1.10.0-dev
 API version:  1.22
 Go version:   go1.5.1
 Git commit:   59a341e
 Built:        Fri Nov 13 17:23:07 UTC 2015
 OS/Arch:      windows/amd64

Server:
 Version:      1.10.0-dev
 API version:  1.22
 Go version:   go1.5.1
 Git commit:   59a341e
 Built:        Fri Nov 13 17:23:07 UTC 2015
 OS/Arch:      windows/amd64

docker info:

PS C:\Users\vagrant\Documents> docker info
Containers: 4
Images: 12
Server Version: 1.10.0-dev
Storage Driver: windowsfilter
 Windows:
Execution Driver:
 Name: Windows 1854
 Build: 1.10.0-dev 59a341e
 Default Isolation: process
Logging Driver: json-file
Kernel Version: 10.0 10586 (10586.11.amd64fre.th2_release.151112-1900)
Operating System: Windows Server 2016 Technical Preview 4
CPUs: 2
Total Memory: 4 GiB
Name: vagrant-2016
ID: 4DGM:46GO:4PW6:QWYV:D2BB:6BMS:SFFA:Z5PO:N5J4:Z6UV:QSAS:MXFM
Debug mode (server): true
 File Descriptors: -1
 Goroutines: 17
 System Time: 2015-11-20T11:36:37.0099665+01:00
 EventsListeners: 0
 Init SHA1:
 Init Path: C:\Windows\System32\docker.exe
 Docker Root Dir: C:\ProgramData\docker

uname -a:

PS C:\Users\vagrant\Documents> uname -a
MSYS_NT-10.0 vagrant-2016 2.3.0(0.290/5/3) 2015-09-29 10:48 x86_64 Msys

Environment details (AWS, VirtualBox, physical, etc.):

Windows Server 2016 TP4

How reproducible:

Create a Dockerfile in the users's Documents folder and try to build it.

Steps to Reproduce:

  1. Open a PowerShell terminal
  2. cd Documents
  3. notepad Dockerfile

Enter eg. this content to the Dockerfile

FROM windowsservercore
CMD [ cmd.exe ]
  1. docker build -t test .

Actual Results:

PS C:\Users\vagrant\Documents> docker build -t test .
Error checking context: 'can't stat '\\?\C:\Users\vagrant\Documents\My Music''.

Expected Results:

It should build the Docker image.

Additional info:

I stumbled upon this problem while a regression test for #15889.
Excuse me for the title, but that was my first thought ;-)

And ok, I think I found the reason. The folder My Music is a hidden directory or a symlink?
I can change into the subfolder "My Music", but then have permission problems.

PS C:\Users\vagrant\Documents> dir


    Directory: C:\Users\vagrant\Documents


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d-----       19.11.2015     19:23                WindowsPowerShell
-a----       20.11.2015     11:53             84 Dockerfile


PS C:\Users\vagrant\Documents> cd '.\My Music\'
PS C:\Users\vagrant\Documents\My Music> dir
dir : Access to the path 'C:\Users\vagrant\Documents\My Music' is denied.
At line:1 char:1
+ dir
+ ~~~
    + CategoryInfo          : PermissionDenied: (C:\Users\vagrant\Documents\My Music:String) [Get-ChildItem], UnauthorizedAccessException
    + FullyQualifiedErrorId : DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand

Activity

  1. added
    kind/bug
    on Nov 24, 2015
  2. thaJeztah commented on Nov 24, 2015

    @thaJeztah
    Member
  3. thaJeztah commented on Nov 24, 2015

    @thaJeztah
    Member

    Thanks for reporting @StefanScherer !

  4. StefanScherer commented on Apr 21, 2016

    @StefanScherer
    ContributorAuthor

    I'll close this one as the PR #21040 is also closed. Docker Client aborts by design if a directory/symlink/etc. could not be sent to the Docker Engine. Tests on Linux with protected files/sub directories show the same behavior.

    Simple workaround if someone wants to write a Dockerfile in the users's Documents folder is adding a .dockerignore file with

    My Music
    My Pictures
    My Videos
    

    Then a docker build -t test . works.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugplatform/windows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions