我是 docker 新手,这应该是在 Windows 机器上运行 Windows 容器。我刚刚开始,但我真的无法运行最简单的命令。这是我使用 nanoserver 运行 echo:
PS C:\git\hello> docker run mcr.microsoft.com/windows/nanoserver:1903 echo "hello"
docker: Error response from daemon: container c828528b48b30dfbbcd48522199c5938dd0363f63df1b328c1d92b0ea23acee8 encountered an error during hcsshim::System::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(173)\vmcomputeagent.exe!00007FF6EFA3B3A7: (caller: 00007FF6EF9EE70B) Exception(2) tid(388) 80070002 The system cannot find the file specified.
CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"echo hello","User":"ContainerUser","WorkingDirectory":"C:\\","CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}.
例如,当我将命令切换到 ipconfig 时,它正在工作:
PS C:\git\hello> docker run mcr.microsoft.com/windows/nanoserver:1903 ipconfig
Windows IP Configuration
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : xxx.xxx
Link-local IPv6 Address . . . . . : xx::xx:xx:xx:xx%4
IPv4 Address. . . . . . . . . . . : xx.xx.xx.xxx
Subnet Mask . . . . . . . . . . . : xx.xx.xx.xx
Default Gateway . . . . . . . . . : xx.xx.xx.xx
请帮忙!