在Windows上的Docker – 生成不工作

我在Windows 10企业版。 拥有16 GB RAM和英特尔酷睿i7处理器。 我已经安装了最新版本的windows版本(17.06)。 当我尝试执行下面的命令时,它只是失败。

docker build -t myiis:v1 . 

当前的工作目录有一个dockerfile,内容如下:

 FROM microsoft/iis SHELL ["powershell"] COPY MyWebsite MyWebsite EXPOSE 8081 RUN powershell New-Website -Name 'my-app' -Port 8081 -PhysicalPath 'c:\MyWebsite' -ApplicationPool 'MyWebsite' 

上述构build的错误代码片段:

 PS C:\VisualStudio> docker build -t myiis:v1 . Sending build context to Docker daemon 25.73MB Step 1/6 : FROM microsoft/iis ---> 52a0c31aaa72 Step 2/6 : SHELL powershell ---> Running in 0b1def636133 ---> 63f5fcdba9c4 Removing intermediate container 0b1def636133 Step 3/6 : COPY MyWebsite MyWebsite ---> dcb97e3cafc9 Removing intermediate container bb04076f5f09 Step 4/6 : EXPOSE 8081 ---> Running in 6e1eb06ec8fa ---> 7ef450aff762 Removing intermediate container 6e1eb06ec8fa Step 5/6 : RUN powershell New-Website -Name 'my-app' -Port 8081 -PhysicalPath 'c:\MyWebsite' -ApplicationPool 'MyWebsite' ---> Running in 35cedf7e50ee docker : container 35cedf7e50ee831ee9a2e4305a0cfb30e3a737379c1952204e50cb689a88996d encountered an error during Start: failure in a Windows system call: The operation timed out because a response was not received from the Virtual Machine hosting the Container. (0xc0370109) At line:1 char:1 + docker build -t myiis:v1 . + ~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (container 35ced...r. (0xc0370109):String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError PS C:\VisualStudio> 

有一点谷歌search显示,这可能是因为缺乏资源,但我的C:\驱动器上有超过386 GB的空间,16 GB的RAM和一个英特尔酷睿i7处理器。

对docker工人来说是新的,目前正在尝试做一个POC,其目的是在容器内的IIS上托pipe一个网站。