我需要在一个容器中运行多个进程,我遵循Docker文档中的“在容器中运行多个服务”。
我创建了一个使用Start-Process
命令的PowerShell脚本,现在我需要用CMD
来运行它,但我无法这样做。
FROM mcr.microsoft.com/windows/nanoserver:1890
# some other commands
WORKDIR C:\\my-work-directory
ADD Start.ps1 .
CMD ["powershell.exe", "-File", "Start.ps1"]
我总是收到“文件未找到”的错误提示:
container XXX encountered an error during CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2) extra info: {"CommandLine":"powershell.exe -File Start.ps1","User":"Administrator","WorkingDirectory":"C:\\my-work-directory","CreateStdOutPipe":"true","CreateStdErrPipe":"true","ConsoleSize":"[0,0]"}
操作系统:Windows 2019
C:\\my-work-directory\Start.ps1
是Start.ps1
的正确位置吗? - mchawre