我创建了一个Windows控制台应用程序,并在该控制台应用程序中使用“ Docker Compose”添加了Docker Orchestration支持。当我通过单击Docker Compose运行它时,它成功运行
在下面的屏幕快照中看到它显示了我添加了Docker文件,我也有Docker Compose项目。您还可以通过单击“ Docker Compose”来查看我已运行。
现在,当我使用以下Docker命令运行它时
docker run -it consoleappcontainer:dev
它抛出错误以下
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: container aedbd4bd0f60eb0184cce3570be103d121c516eac3cf222662258f6dd0ca0c50 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: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(174)\vmcomputeagent.exe!00007FF7303DC00A: (caller: 00007FF7303AECEA) Exception(2) tid(380) 80070002 The system cannot find the file specified.
CallContext:[\Bridge_ProcessMessage\ComputeSystemManager_ExecuteProcess\VmHostedContainer_ExecuteProcess]
Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"C:\\app\\ConsoleAppContainer.exe","WorkingDirectory":"C:\\app","Environment":{"COMPLUS_NGenProtectedProcess_FeatureEnabled":"0"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[50,192]}.
下面是我的DOCKER文件
FROM microsoft/dotnet-framework:4.7.2-runtime-windowsservercore-1803
ARG source
WORKDIR /app
COPY ${source:-obj/Docker/publish} .
ENTRYPOINT ["C:\\app\\ConsoleAppContainer.exe"]
为什么使用DOCKER COMPOSE按钮正确运行EXE后找不到它?
答案 0 :(得分:0)
当您从那里运行时,我不知道Visual Studio到底在做什么……看看输出窗口中是否有东西可以给您提示...
还有一件事情,当涉及到docker compose时,您应该以{{1}}开始。当您只想使用docker-compose up