Running into some issues dockerizing one of our Window's C++ x86 application while adding "Removed" base container features. Some work, others fail. The container host is Windows Server 2019 Standard, Version 1809, and the container base image is mcr.microsoft.com/windows/servercore:ltsc2019. The 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" ]
Using the stock container (no dockerfile), the default values for some of our dependencies are:
PS> Get-WindowsFeature:
[ ] .NET Framework 3.5 Features NET-Framework-Features Removed
[ ] Message Queuing MSMQ Available
[ ] Quality Windows Audio Video Experience qWave Removed
Then after using the dockerfile:
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
The qWave dependency fails to install and generates the following error when attempted within the dockerfile with:
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.
What is different between the "NET-Framework-Features install" and the "qWave install"? When should one install option be used instead of another?
Install-WindowsFeature from the ServerManager module in PowerShell
Enable-WindowsOptionalFeature from the DISM module in PowerShell
dism.exe /online /enable-feature from DISM.
Which one, and how can this be done for qWave?
User contributions licensed under CC BY-SA 3.0