我在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步:运行写入输出“ hello” --->在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系统找不到指定的文件。
编辑/更新 似乎
答案 0 :(得分:0)
使用curl代替
RUN curl.exe -o node.zip https://nodejs.org/dist/v9.2.0/node-v9.2.0-win-x64.zip && \
mkdir "C:\\Program Files\\node" && \
tar.exe -xf node.zip -C "C:\\Program Files\\node" --strip-components=1
https://blogs.technet.microsoft.com/virtualization/2017/12/19/tar-and-curl-come-to-windows/