Answered by:
simplistic docker file

Question
-
I tried to create a simple dockerfile that looks like:
FROM windowsservercore
LABEL Description="foo test"
ADD tools /sysinternalsI did a successful docker build
PS C:\build> docker build -t foo C:\build
Sending build context to Docker daemon 35.76 MB
Step 0 : FROM windowsservercore
---> 0d53944cb84d
Step 1 : LABEL Description "foo test"
---> Using cache
---> 1cba8955345f
Step 2 : ADD tools /sysinternals
---> b94f0c9df634
Removing intermediate container 42f35092d3af
Successfully built b94f0c9df634Then if i try to run this container, I get the following-
PS C:\build> docker run -it --name myfirstcontainer foo cmd
Error response from daemon: Cannot start container b71443a8be8a163a06f60c4be00ea3592e16e865d8c69f5c5d947c5ed164b167: HCSShim::CreateComputeSystem - Win32 API call returned error r1=2147942405 err=Access is denied. id=b71443a8be8a163a06f60c4be00ea3592e16e865d8c69f5c5d947c5ed164b167 configuration={"SystemType":"Container","Name":"b71443a8be8a163a06f60c4be00ea3592e16e865d8c69f5c5d947c5ed164b167","Owner":"docker","IsDummy":false,"VolumePath":"\\\\?\\Volume{e7bfe2b2-475c-11e5-89bc-00155d000001}","Devices":[{"DeviceType":"Network","Connection":{"NetworkName":"Virtual Switch","EnableNat":false,"Nat":{"Name":"ContainerNAT","PortBindings":null}},"Settings":null}],"IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\b71443a8be8a163a06f60c4be00ea3592e16e865d8c69f5c5d947c5ed164b167","Layers":[{"ID":"941684ba-8deb-58e6-aa27-dd2d973dc824","Path":"C:\\ProgramData\\docker\\windowsfilter\\b94f0c9df634dcbccd23891c7f6f9857a573162346e77e7366524b9172bffc0f"},{"ID":"7cc5e5d4-2afb-57e4-aec0-1bb7afb1a764","Path":"C:\\ProgramData\\docker\\windowsfilter\\1cba8955345f55a0573006d594d390dfac0b71be86c662137b9d0dcef5b037cc"},{"ID":"f0d4aaa3-c43d-59c1-8ad0-44e6b3381efc","Path":"C:\\ProgramData\\Microsoft\\Windows\\Images\\CN=Microsoft_WindowsServerCore_10.0.10514.0"}]}
PS C:\build>
Am I doing something wrong or missing something?
Thursday, August 20, 2015 5:33 PM
Answers
-
Ah, so per this issue I filed on docker/docker (https://github.com/docker/docker/issues/15795) there is a hotfix that needed to be installed via Windows Update (KB3081439) and that solves the problem.
- Proposed as answer by matthewbentley Monday, August 24, 2015 10:45 PM
- Marked as answer by Ender Barillas [MSFT] Saturday, August 29, 2015 12:21 AM
Monday, August 24, 2015 10:45 PM
All replies
-
I removed a whole bunch of running docker containers, the image, recreated it, and its clean.
not sure what happened here...
Thursday, August 20, 2015 6:38 PM -
I seem to get similar errors when starting multiple containers. I'm just doing some basic testing and after running my first container, I get an error starting another:
docker run -it --rm --name test windowsservercore ping google.com
Error response from daemon: Cannot start container b732243fc4f3054e302b4c7818c3ca500315cdb04592d73bc45a728e6af4b275: HCSShim::CreateComputeSystem - Win32 API call returned error r1=2147942405 err=Access is denied. id=b732243fc4f3054e302b4c7818c3ca500315cdb04592d73bc45a728e6af4b275 configuration={"SystemType":"Container","Name":"b732243fc4f3054e302b4c7818c3ca500315cdb04592d73bc45a728e6af4b275","Owner":"docker","IsDummy":false,"VolumePath":"\\\\?\\Volume{aba2bf24-4a7f-11e5-89c1-0800275b190d}","Devices":[{"DeviceType":"Network","Connection":{"NetworkName":"Virtual Switch","EnableNat":false,"Nat":{"Name":"ContainerNAT","PortBindings":null}},"Settings":null}],"IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\b732243fc4f3054e302b4c7818c3ca500315cdb04592d73bc45a728e6af4b275","Layers":[{"ID":"f0d4aaa3-c43d-59c1-8ad0-44e6b3381efc","Path":"C:\\ProgramData\\Microsoft\\Windows\\Images\\CN=Microsoft_WindowsServerCore_10.0.10514.0"}]}It seems to randomly work later but it seems that I can only reliably get it working again by restarting my VM. Restarting the daemon doesn't help.
Monday, August 24, 2015 2:21 PM -
Ah, so per this issue I filed on docker/docker (https://github.com/docker/docker/issues/15795) there is a hotfix that needed to be installed via Windows Update (KB3081439) and that solves the problem.
- Proposed as answer by matthewbentley Monday, August 24, 2015 10:45 PM
- Marked as answer by Ender Barillas [MSFT] Saturday, August 29, 2015 12:21 AM
Monday, August 24, 2015 10:45 PM -
Hi Matthew, hi Rismoney,
Please see this thread for some steps how to install the Update (Sunday, August 23, 2015 7:03 PM)
Hope this helps,
Lars
This posting is provided AS IS with no warranties, and confers no rights. You assume all risk for your use.
Monday, August 24, 2015 11:09 PM