Docker运行时显示“ CreateProcess:Windows系统调用失败:系统找不到指定的文件。(0x2)”

时间:2019-08-11 20:45:06

标签: asp.net docker dockerfile docker-for-windows

我对Docker非常陌生。我正在尝试将helloworld API码头化。 但是,当我尝试通过docker运行映像时,出现此错误:

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container f891d7fc7af6e1183256043e6105fc87e25c6959d9745cc972b42c7b2e6f5a06 encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(168)\vmcomputeagent.exe!00007FF683797B25: (caller: 00007FF68377A312) Exception(4) tid(108) 80070002 The system cannot find the file specified.
    CallContext:[\Bridge_ProcessMessage\ComputeSystemManager_ExecuteProcess\VmHostedContainer_ExecuteProcess]
 Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"dotnet HelloWorldDocker.dll","WorkingDirectory":"C:\\app\\bin","Environment":{"COMPLUS_NGenProtectedProcess_FeatureEnabled":"0","ROSLYN_COMPILER_LOCATION":"c:\\\\RoslynCompilers\\\\tools"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}.

我有一个简单的asp.net API。而且我已将其发布到同一文件夹./publish 这是我的docker文件

FROM microsoft/aspnet:4.7.1-windowsservercore-1709
WORKDIR /app

COPY ./publish .
WORKDIR bin
RUN ls
ENTRYPOINT ["dotnet", "HelloWorldDocker.dll"]

ls显示HelloWorldDocker.dll在目录./bin (app/bin)中。 IDK这是怎么了...

0 个答案:

没有答案