Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
添加或启用Docker Windows容器的应用程序依赖项 在添加“移除”的基本容器特征时,我们会碰到一些问题,将窗口中的一个C++ x86应用程序停靠。有些成功,有些失败。容器主机为Windows Server 2019标准版1809,容器基础映像为mcr.microsoft.com/Windows/servercore:ltsc2019。dockerfile: # Sample Dockerfile # Indicates that the windowsservercore image will be used as the base image. FROM mcr.microsoft.com/windows/servercore:ltsc2019 # Uses dism.exe to install the IIS role. RUN dism.exe /online /enable-feature /all /featurename:iis-webserver /NoRestart SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # Add c++ runtime (from local copy) #ADD https://aka.ms/vs/15/release/vc_redist.x86.exe / ADD prereq/vc_redist.x86.exe / RUN Start-Process vc_redist.x86.exe -ArgumentList '/quiet' -Wait ; # Add "Available" features contained within the base image RUN powershell -Command Add-WindowsFeature MSMQ-Services # Add "Removed" application dependencies, services RUN powershell "Set-Service -Name wuauserv -StartupType Manual RUN powershell "Install-WindowsFeature -Name NET-Framework-Features -Verbose" # ToDo #NOT-Working RUN net start lltdsvc # Note: indicates the service starts, but from within the shell, shows not running #NOT-Working RUN powershell "Install-WindowsFeature -Name qWave -Verbose" # Sets a command or process that will run each time a container is run from the new image. CMD [ "cmd" ] PS> Get-WindowsFeature: [X] .NET Framework 3.5 Features NET-Framework-Features Installed [X] Message Queuing MSMQ Installed [ ] Quality Windows Audio Video Experience qWave Removed_Windows_Docker - Fatal编程技术网

添加或启用Docker Windows容器的应用程序依赖项 在添加“移除”的基本容器特征时,我们会碰到一些问题,将窗口中的一个C++ x86应用程序停靠。有些成功,有些失败。容器主机为Windows Server 2019标准版1809,容器基础映像为mcr.microsoft.com/Windows/servercore:ltsc2019。dockerfile: # Sample Dockerfile # Indicates that the windowsservercore image will be used as the base image. FROM mcr.microsoft.com/windows/servercore:ltsc2019 # Uses dism.exe to install the IIS role. RUN dism.exe /online /enable-feature /all /featurename:iis-webserver /NoRestart SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # Add c++ runtime (from local copy) #ADD https://aka.ms/vs/15/release/vc_redist.x86.exe / ADD prereq/vc_redist.x86.exe / RUN Start-Process vc_redist.x86.exe -ArgumentList '/quiet' -Wait ; # Add "Available" features contained within the base image RUN powershell -Command Add-WindowsFeature MSMQ-Services # Add "Removed" application dependencies, services RUN powershell "Set-Service -Name wuauserv -StartupType Manual RUN powershell "Install-WindowsFeature -Name NET-Framework-Features -Verbose" # ToDo #NOT-Working RUN net start lltdsvc # Note: indicates the service starts, but from within the shell, shows not running #NOT-Working RUN powershell "Install-WindowsFeature -Name qWave -Verbose" # Sets a command or process that will run each time a container is run from the new image. CMD [ "cmd" ] PS> Get-WindowsFeature: [X] .NET Framework 3.5 Features NET-Framework-Features Installed [X] Message Queuing MSMQ Installed [ ] Quality Windows Audio Video Experience qWave Removed

添加或启用Docker Windows容器的应用程序依赖项 在添加“移除”的基本容器特征时,我们会碰到一些问题,将窗口中的一个C++ x86应用程序停靠。有些成功,有些失败。容器主机为Windows Server 2019标准版1809,容器基础映像为mcr.microsoft.com/Windows/servercore:ltsc2019。dockerfile: # Sample Dockerfile # Indicates that the windowsservercore image will be used as the base image. FROM mcr.microsoft.com/windows/servercore:ltsc2019 # Uses dism.exe to install the IIS role. RUN dism.exe /online /enable-feature /all /featurename:iis-webserver /NoRestart SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] # Add c++ runtime (from local copy) #ADD https://aka.ms/vs/15/release/vc_redist.x86.exe / ADD prereq/vc_redist.x86.exe / RUN Start-Process vc_redist.x86.exe -ArgumentList '/quiet' -Wait ; # Add "Available" features contained within the base image RUN powershell -Command Add-WindowsFeature MSMQ-Services # Add "Removed" application dependencies, services RUN powershell "Set-Service -Name wuauserv -StartupType Manual RUN powershell "Install-WindowsFeature -Name NET-Framework-Features -Verbose" # ToDo #NOT-Working RUN net start lltdsvc # Note: indicates the service starts, but from within the shell, shows not running #NOT-Working RUN powershell "Install-WindowsFeature -Name qWave -Verbose" # Sets a command or process that will run each time a container is run from the new image. CMD [ "cmd" ] PS> Get-WindowsFeature: [X] .NET Framework 3.5 Features NET-Framework-Features Installed [X] Message Queuing MSMQ Installed [ ] Quality Windows Audio Video Experience qWave Removed,windows,docker,Windows,Docker,使用库存容器(无dockerfile),一些依赖项的默认值为: PS> Get-WindowsFeature: [ ] .NET Framework 3.5 Features NET-Framework-Features Removed [ ] Message Queuing MSMQ

使用库存容器(无dockerfile),一些依赖项的默认值为:

PS> Get-WindowsFeature:

    [ ] .NET Framework 3.5 Features                         NET-Framework-Features           Removed
    [ ] Message Queuing                                     MSMQ                           Available
    [ ] Quality Windows Audio Video Experience              qWave                            Removed
然后在使用dockerfile后:

# Sample Dockerfile

# Indicates that the windowsservercore image will be used as the base image.
FROM mcr.microsoft.com/windows/servercore:ltsc2019

# Uses dism.exe to install the IIS role.
RUN dism.exe /online /enable-feature /all /featurename:iis-webserver /NoRestart

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

# Add c++ runtime (from local copy)
#ADD https://aka.ms/vs/15/release/vc_redist.x86.exe /
ADD prereq/vc_redist.x86.exe /
RUN Start-Process vc_redist.x86.exe -ArgumentList '/quiet' -Wait ;

# Add "Available" features contained within the base image
RUN powershell -Command Add-WindowsFeature MSMQ-Services

# Add "Removed" application dependencies, services 
RUN powershell "Set-Service -Name wuauserv -StartupType Manual
RUN powershell "Install-WindowsFeature -Name NET-Framework-Features -Verbose"

# ToDo
#NOT-Working RUN net start lltdsvc    # Note: indicates the service starts, but from within the shell, shows not running
#NOT-Working RUN powershell "Install-WindowsFeature -Name qWave -Verbose"

# Sets a command or process that will run each time a container is run from the new image.
CMD [ "cmd" ]
PS> Get-WindowsFeature:
    [X] .NET Framework 3.5 Features                         NET-Framework-Features         Installed
    [X] Message Queuing                                     MSMQ                           Installed
    [ ] Quality Windows Audio Video Experience              qWave                            Removed
在dockerfile中尝试使用时,qWave依赖项无法安装,并生成以下错误:

Step 9/10 : RUN powershell "Install-WindowsFeature -Name qWave -Verbose"
 ---> Running in 47c05096ef04
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, 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
+ Install-WindowsFeature -Name qWave -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (@{Vhd=; Credent...Name=localh
   ost}:PSObject) [Install-WindowsFeature], Exception
    + FullyQualifiedErrorId : DISMAPI_Error__Failed_To_Enable_Updates,Microsof
   t.Windows.ServerManager.Commands.AddWindowsFeatureCommand

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
False   No             Failed         {}
VERBOSE: Installation succeeded.
“netframeworkfeatures安装”和“qWave安装”有什么不同?什么时候应该使用一个安装选项而不是另一个

Install-WindowsFeature from the ServerManager module in PowerShell
Enable-WindowsOptionalFeature from the DISM module in PowerShell
dism.exe /online /enable-feature from DISM.
哪一个,如何为qWave做到这一点