Hello All,
I am using a dockerfile to build a custom image, which add the App Compatibility Feature on Demand on servercore container.
Expected Behavious
it supposed to install the App Compatibility Feature on Demand on the server
Actual behavior
PS command Add-WindowsCapability is getting failed with below error
Add-WindowsCapability : 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.
At line:1 char:2
- (Add-WindowsCapability -Name ‘ServerCore.AppCompatibility~~~~0.0.1.0’ …
-
+ CategoryInfo : NotSpecified: (:) [Add-WindowsCapability], COMEx ception + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsCapabilityComm and
Information
Docker Version : 18.03.1-ee-10
Host OS Version : Server 2019 Datacenter
Container : ServerCore:LTSC2019-AMD64
###DockerFile
###############################################
FROM mcr.microsoft.com/windows/servercore:ltsc2019-amd64
RUN powershell.exe -Command
Start-Service -Name “TrustedInstaller”;
Start-Service -Name “msiserver”;
Set-Service -Name wuauserv -StartupType Automatic;
Start-Service -Name “wuauserv”
RUN powershell.exe -Command (Add-WindowsCapability -Name ‘ServerCore.AppCompatibility~~~~0.0.1.0’ -Online)
#####################################################
Steps to reproduce the behavior
- docker build -t imagename C:\Docker\