我正在尝试从使用 .NET 3.5 的本地构建环境中创建一个 docker 映像。我尝试启用该功能但收到错误。
这是我用于重现问题的最小化 docker 文件:
FROM mcr.microsoft.com/dotnet/framework/sdk
RUN powershell "Install-WindowsFeature -Name NET-Framework-Features -Verbose"
Run Code Online (Sandbox Code Playgroud)
这是输出:
Sending build context to Docker daemon 72.74MB
Step 1/2 : FROM mcr.microsoft.com/dotnet/framework/sdk
---> 88afad8be364
Step 2/2 : RUN powershell "Install-WindowsFeature -Name NET-Framework-Features -Verbose"
---> Running in 0a377584126e
VERBOSE: Installation started...
VERBOSE: Continue with installation?
VERBOSE: Prerequisite processing started...
VERBOSE: Prerequisite processing succeeded.
Install-WindowsFeature : The request to add or remove features on the
specified server failed.
Installation of one or more roles, …Run Code Online (Sandbox Code Playgroud)