【发布时间】:2019-07-01 07:00:16
【问题描述】:
我的 Dockerfile 中有这个。
FROM microsoft/dotnet:2.1-sdk-nanoserver-1803 AS build
WORKDIR /src
...
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
RUN Write-Output 'hello from ps'
我运行 docker build 并在我的 dockerfile 中到达这一点,然后我收到以下错误消息。
步骤 8/24:运行写入输出“你好” ---> 在 ea5d79c5698c 中运行 容器 ea5d7....5cb94f67 在 CreateProcess 期间遇到错误:Windows 系统调用失败:系统找不到指定的文件。 (0x2) onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(174)\vmcomputeagent.exe!00007FF738A6C00A: (caller: 00007FF738A3ECEA) Exception(2) tid(36c) 80070002 系统找不到指定的文件。
编辑/更新 看来
- microsoft/aspnetcore-build 不支持 .net core 2.1(但有 powershell 和 node 都已安装)
- microsoft/dotnet:2.1-sdk 是指 用于构建,但缺少 powershell 和 node
- 同样适用 microsoft/dotnet:2.1-sdk-nanoserver-1803
【问题讨论】:
标签: powershell docker