简体   繁体   English

Windows docker映像构建在创建目录时挂起

[英]Windows docker image build hangs on creating a directory

I'm following the instructions given by Microsoft to create a windows docker image for an ASP.Net application but for some reason it can't get past the mkdir step. 我正在按照Microsoft说明为ASP.Net应用程序创建Windows docker映像,但是由于某种原因,它无法通过mkdir步骤。

Here is the dockerfile: 这是dockerfile:

FROM microsoft/aspnet

RUN mkdir C:\storefront

RUN powershell -NoProfile -Command \
    Import-module IISAdministration; \
    New-IISSite -Name "Storefront" -PhysicalPath C:\storefront -BindingInformation "*:80:"

EXPOSE 80

ADD storefront/ /storefront

And here is the output I'm getting: 这是我得到的输出:

docker build -t storefront .
Sending build context to Docker daemon 137.8 MB
Step 1/5 : FROM microsoft/aspnet
 ---> e761eca2f8df
Step 2/5 : RUN mkdir C:\storefront
 ---> Running in a939dd7163b1

and it just hangs here on mkdir. 它只是挂在mkdir上。

I've already tried using md , changing the backslashes to slashes, and using a relative path instead of the drive letter, all of them result in the same thing happening. 我已经尝试过使用md ,将反斜杠更改为斜杠,并使用相对路径而不是驱动器号,所有这些都会导致同一件事的发生。

EDIT: 编辑:

Here's the log output of the build: 这是构建的日志输出:

[12:22:10.718][ApiProxy       ][Info   ] proxy >> GET /_ping
[12:22:10.718][ApiProxy       ][Info   ] Dial name pipe  \\.\pipe\docker_engine_windows
[12:22:10.718][ApiProxy       ][Info   ] Successfully dialed name pipe \\.\pipe\docker_engine_windows
[12:22:10.718][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:10.718369300-05:00" level=debug msg="Calling GET /_ping" 
[12:22:10.718][ApiProxy       ][Info   ] proxy << GET /_ping
[12:22:11.106][ApiProxy       ][Info   ] proxy >> POST /v1.25/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=storefront&ulimits=null
[12:22:11.106][ApiProxy       ][Info   ] Dial name pipe  \\.\pipe\docker_engine_windows
[12:22:11.106][ApiProxy       ][Info   ] Successfully dialed name pipe \\.\pipe\docker_engine_windows
[12:22:11.106][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:11.106869500-05:00" level=debug msg="Calling POST /v1.25/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&    networkmode=default&rm=1&shmsize=0&t=storefront&ulimits=null" 
[12:22:34.138][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.138382000-05:00" level=debug msg="[BUILDER] Cache miss: [cmd /S /C mkdir C:\\storefront]" 
[12:22:34.138][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.138382000-05:00" level=debug msg="[BUILDER] Command to be executed: [cmd /S /C mkdir C:\\storefront]" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="hcsshim::GetLayerMountPath Flavour 1 ID 8aa6a1776a6803a692f68e8ac6da9c5edcb38cfcdf2edd75c5706442323e7f5b" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="Calling proc (1)" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="Calling proc (2)" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="hcsshim::GetLayerMountPath succeeded flavour=1 id=8aa6a1776a6803a692f68e8ac6da9c5edcb38cfcdf2edd75c5706442323e7f5b     path=C:\\ProgramData\\Docker\\windowsfilter\\8aa6a1776a6803a692f68e8ac6da9c5edcb38cfcdf2edd75c5706442323e7f5b" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="hcsshim::CreateSandboxLayer layerId 6c84bcad548f6d4b74239e882e156d7a9dffa2b38842393b237b8c4470364f2c parentId     C:\\ProgramData\\Docker\\windowsfilter\\8aa6a1776a6803a692f68e8ac6da9c5edcb38cfcdf2edd75c5706442323e7f5b" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="hcsshim::NameToGuid Name 8aa6a1776a6803a692f68e8ac6da9c5edcb38cfcdf2edd75c5706442323e7f5b" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="hcsshim::NameToGuid Name 4bbfe8c329c52aca77b41bf0c3c7673ca55232f3520a74dacd3befa4ffa7a161" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="hcsshim::NameToGuid Name 6f7c5ba7066e3999eadcb8c7ce0ce997cf65a748f15755557b2bc3dd79d2e8cc" 
[12:22:34.140][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="hcsshim::NameToGuid Name 4d9fc7ac017392ffdd91d3b2efe1bce1cadcab146692490e8c9300747be6ce40" 
[12:22:34.141][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.140380500-05:00" level=debug msg="hcsshim::NameToGuid Name 3fc2c39416c9725cedc3e74e11d53a63338a00ec33c968657b2724cdd0da9b4a" 
[12:22:34.141][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.141380400-05:00" level=debug msg="hcsshim::NameToGuid Name 70d596762a12ad5312e4594bd5d1670ee886d76d356a464a22b9fa648ab42bf9" 
[12:22:34.147][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.147380700-05:00" level=debug msg="hcsshim::CreateSandboxLayer - succeeded layerId=6c84bcad548f6d4b74239e882e156d7a9dffa2b38842393b237b8c4470364f2c     parentId=C:\\ProgramData\\Docker\\windowsfilter\\8aa6a1776a6803a692f68e8ac6da9c5edcb38cfcdf2edd75c5706442323e7f5b" 
[12:22:34.211][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.211976300-05:00" level=debug msg="Assigning addresses for endpoint condescending_fermi's interface on network nat" 
[12:22:34.211][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.211976300-05:00" level=debug msg="RequestAddress(172.25.112.0/20, <nil>, map[])" 
[12:22:34.211][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.211976300-05:00" level=debug msg="attach: stdout: begin" 
[12:22:34.211][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:34.211976300-05:00" level=debug msg="attach: stderr: begin" 
[12:22:49.531][ApiProxy       ][Info   ] Cancel connection...
[12:22:49.531][WindowsDockerDaemon][Info   ] time="2017-02-08T12:22:49.531681200-05:00" level=debug msg="Build cancelled, killing and removing container: 6c84bcad548f6d4b74239e882e156d7a9dffa2b38842393b237b8c4470364f2c" 

安装最新的Windows更新和新版本的Docker可以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM