首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在windows docker contaiener容器上安装打印服务器失败

在windows docker contaiener容器上安装打印服务器失败
EN

Stack Overflow用户
提问于 2020-10-07 06:35:36
回答 1查看 434关注 0票数 4

我正在运行一个全新的mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019,我尝试做的第一件事就是安装Print-Server,但出现了一个错误(这是我第一次使用powershell安装windows特性):

代码语言:javascript
复制
add-WindowsFeature -Name Print-Server

add-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source
location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f
At line:1 char:1
+ add-WindowsFeature -Name Print-Services -IncludeAllSubFeature
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localhost}:PSObject) [Install-WindowsFeature], Exception
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand

我尝试在容器内挂载我的主机WinSxS并使用sources文件夹,但是我得到了相同的错误。

代码语言:javascript
复制
Install-WindowsFeature -Name Print-Server -Source c:\sources

我也尝试过在线使用Enable-WindowsOptionalFeature,但出现了以下错误:

代码语言:javascript
复制
PS C:\> Enable-WindowsOptionalFeature -Online -FeatureName Print-Server
Enable-WindowsOptionalFeature : Feature name Print-Server is unknown.
At line:1 char:1
+ Enable-WindowsOptionalFeature -Online -FeatureName Print-Server
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

看看其他问题,这部分看起来是为其他人工作的。我运行的是Windows10企业版2004。有人知道我能做什么吗?

EN

回答 1

Stack Overflow用户

发布于 2021-05-21 15:23:55

From here

mcr.microsoft.com/windows映像应为目标基本映像。其他基于Windows容器的镜像(如Nano Server和Windows Server Core)不具有打印服务器角色。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64234710

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档