{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/27545","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/27545/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/27545/comments","events_url":"https://api.github.com/repos/docker/docker/issues/27545/events","html_url":"https://github.com/docker/docker/issues/27545","id":183986728,"number":27545,"title":"Inconsistent Dockerfile behavior between Windows Containers and Linux","user":{"login":"MichaelSimons","id":8290530,"avatar_url":"https://avatars.githubusercontent.com/u/8290530?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelSimons","html_url":"https://github.com/MichaelSimons","followers_url":"https://api.github.com/users/MichaelSimons/followers","following_url":"https://api.github.com/users/MichaelSimons/following{/other_user}","gists_url":"https://api.github.com/users/MichaelSimons/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelSimons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelSimons/subscriptions","organizations_url":"https://api.github.com/users/MichaelSimons/orgs","repos_url":"https://api.github.com/users/MichaelSimons/repos","events_url":"https://api.github.com/users/MichaelSimons/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelSimons/received_events","type":"User","site_admin":false},"labels":[{"id":73616520,"url":"https://api.github.com/repos/docker/docker/labels/area/builder","name":"area/builder","color":"fbca04","default":false},{"id":161101581,"url":"https://api.github.com/repos/docker/docker/labels/platform/windows","name":"platform/windows","color":"F6FBFF","default":false},{"id":375714123,"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2016-10-19T14:58:58Z","updated_at":"2016-10-28T17:09:37Z","closed_at":null,"body":"**Description**\r\n\r\nIt appears the Windows Containers behavior of the `COPY` command is slightly different than on Linux when the destination is `.`\r\n\r\n**Steps to reproduce the issue:**\r\n1. Get a working Windows Container environment.\r\n2. Create a directory with some files with one of them named `project.json`\r\n3. Add the following Dockerfile to the directory.  Note:  This is a simplified Dockerfile.  In the real usage there are commands in between the COPY commands that don't need to be re-run if the project.json doesn't change.\r\n```\r\nFROM microsoft/nanoserver\r\n\r\nWORKDIR app\r\nCOPY project.json .\r\nCOPY . .\r\n```\r\n\r\n**Describe the results you received:**\r\nOutput of building is:\r\n```\r\nSending build context to Docker daemon 6.144 kB\r\nStep 1/4 : FROM microsoft/nanoserver\r\n ---> 105d76d0f40e\r\nStep 2/4 : WORKDIR app\r\n ---> Using cache\r\n ---> 5c0466311dc7\r\nStep 3/4 : COPY project.json .\r\n ---> Using cache\r\n ---> 0d4a942fa0c6\r\nStep 4/4 : COPY . .\r\nmkdir \\\\?\\Volume{c0949f92-8c99-11e6-b9a3-adda2ced055a}\\app: The system cannot find the path specified.\r\n```\r\n\r\n**Describe the results you expected:**\r\nThe same Dockerfile with the exception of `FROM debian:jessie` builds and produces the expected results (all files are copied into the app dir) in my Ubuntu environment.\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\nThere are two ways to get the Dockerfile to work on Windows Containers\r\n1. Add `RUN mkdir c:\\app` before the `WORKDIR` command\r\n2. Change the two `COPY` destinations to `./` \r\n\r\n**Output of `docker version`:**\r\n\r\n```\r\nClient:\r\n Version:      1.12.2-cs2-ws-beta\r\n API version:  1.25\r\n Go version:   go1.7.1\r\n Git commit:   050b611\r\n Built:        Tue Oct 11 02:35:40 2016\r\n OS/Arch:      windows/amd64\r\n\r\nServer:\r\n Version:      1.12.2-cs2-ws-beta\r\n API version:  1.25\r\n Go version:   go1.7.1\r\n Git commit:   050b611\r\n Built:        Tue Oct 11 02:35:40 2016\r\n OS/Arch:      windows/amd64\r\n```\r\n\r\n**Output of `docker info`:**\r\n\r\n```\r\nContainers: 18\r\n Running: 1\r\n Paused: 0\r\n Stopped: 17\r\nImages: 302\r\nServer Version: 1.12.2-cs2-ws-beta\r\nStorage Driver: windowsfilter\r\n Windows:\r\nLogging Driver: json-file\r\nPlugins:\r\n Volume: local\r\n Network: nat null overlay\r\nSwarm: inactive\r\nDefault Isolation: process\r\nKernel Version: 10.0 14393 (14393.206.amd64fre.rs1_release.160915-0644)\r\nOperating System: Windows Server 2016 Standard Evaluation\r\nOSType: windows\r\nArchitecture: x86_64\r\nCPUs: 1\r\nTotal Memory: 1.159 GiB\r\nName: WIN-F6RFOUBH784\r\nID: R644:EESZ:OP6H:7Z62:UABL:VAFV:7TZC:BIR7:KXD7:ISDG:SP37:FXUY\r\nDocker Root Dir: C:\\ProgramData\\docker\r\nDebug Mode (client): false\r\nDebug Mode (server): false\r\nRegistry: https://index.docker.io/v1/\r\nInsecure Registries:\r\n 127.0.0.0/8\r\nLive Restore Enabled: false\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/256975498","html_url":"https://github.com/docker/docker/issues/27545#issuecomment-256975498","issue_url":"https://api.github.com/repos/docker/docker/issues/27545","id":256975498,"user":{"login":"jhowardmsft","id":10522484,"avatar_url":"https://avatars.githubusercontent.com/u/10522484?v=3","gravatar_id":"","url":"https://api.github.com/users/jhowardmsft","html_url":"https://github.com/jhowardmsft","followers_url":"https://api.github.com/users/jhowardmsft/followers","following_url":"https://api.github.com/users/jhowardmsft/following{/other_user}","gists_url":"https://api.github.com/users/jhowardmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/jhowardmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhowardmsft/subscriptions","organizations_url":"https://api.github.com/users/jhowardmsft/orgs","repos_url":"https://api.github.com/users/jhowardmsft/repos","events_url":"https://api.github.com/users/jhowardmsft/events{/privacy}","received_events_url":"https://api.github.com/users/jhowardmsft/received_events","type":"User","site_admin":false},"created_at":"2016-10-28T17:09:37Z","updated_at":"2016-10-28T17:09:37Z","body":"PS here's the working dockerfile which will behave consistently for both container types.\r\n\r\n```\r\n# escape=`\r\n\r\nFROM nanoserver\r\nRUN mkdir c:\\app\r\nWORKDIR c:\\app\r\nCOPY project.json .\r\nCOPY . .\r\n```"}}
{"actor":{"display_login":"jhowardmsft"}}