Adding windows capabilities to Windows server core running in docker

3

I am running the microsoft/windowsservercore:1803 in docker:

docker run -it microsoft/windowsservercore:1803

inside it, I start powershell and run the Get-WindowsCapability cmdlet and get the following output:

PS C:\> Get-WindowsCapability -online
Get-WindowsCapability : The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
At line:1 char:1
+ Get-WindowsCapability -online
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-WindowsCapability], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.GetWindowsCapabilityCommand

What service it refers to? Can I set up the container so it would allow me to run that, or Add-WindowsCapability cmdlets?

Ultimately, I want to run [officially distributed by Microsoft] OpenSSH server.

Update. I checked the status of Windows Update and TrustedInstaller services in the container (as were suggested in the comments): the former was disabled, so I enabled it:

Set-Service -Name wuauserv -StartupType Manual
Start-Service -name wuauserv

And tried running Get-WindowsCapability again:

PS C:\> Get-WindowsCapability -online
Get-WindowsCapability : Get-WindowsCapability failed. Error code = 0x80d03805
At line:1 char:1
+ Get-WindowsCapability -online
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-WindowsCapability], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.GetWindowsCapabilityCommand

Still does not work, but error is now different.

This is what I see in the EventLog:

PS C:\> Get-EventLog system

   Index Time          EntryType   Source                 InstanceID Message
   ----- ----          ---------   ------                 ---------- -------
     312 Jun 24 14:07  Information Service Control M...   1073748860 The Windows Update service entered the stopped state.
     311 Jun 24 14:01  Information Service Control M...   1073748860 The Remote Registry service entered the stopped state.
     310 Jun 24 13:59  Information Service Control M...   1073748860 The Windows Error Reporting Service service entered the stopped state.
     309 Jun 24 13:59  Information Service Control M...   1073748860 The Windows Modules Installer service entered the stopped state.
     308 Jun 24 13:57  Information Service Control M...   1073748860 The Windows Error Reporting Service service entered the running state.
     307 Jun 24 13:57  Error       DCOM                        10001 The description for Event ID '10001' in Source 'DCOM' cannot be found.  The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them.  The following information is part of the event:'C:\Windows\system32\...
     306 Jun 24 13:57  Error       DCOM                        10001 The description for Event ID '10001' in Source 'DCOM' cannot be found.  The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them.  The following information is part of the event:'C:\Windows\system32\...
     305 Jun 24 13:57  Information Service Control M...   1073748860 The Delivery Optimization service entered the running state.
     304 Jun 24 13:57  Information Microsoft-Windows...           44 Windows Update started downloading an update.
     303 Jun 24 13:57  Information Service Control M...   1073748860 The Windows Modules Installer service entered the running state.
     302 Jun 24 13:57  Information Service Control M...   1073748860 The Windows Update service entered the running state.

The two error messages are:

The description for Event ID '10001' in Source 'DCOM' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event:'C:\Windows\system32\DllHost.exe /Processid:{AA65DD7C-83AC-48C0-A6FD-9B61FEBF8800}', '0', '{AA65DD7C-83AC-48C0-A6FD-9B61FEBF8800}', 'Unavailable', 'Unavailable'

The description for Event ID '10001' in Source 'DCOM' cannot be found. The local computer may not have the necessary registry information or message DLL files to display the message, or you may not have permission to access them. The following information is part of the event:'C:\Windows\system32\DllHost.ex /Processid:{AA65DD7C-83AC-48C0-A6FD-9B61FEBF8800}', '1008', '{AA65DD7C-83AC-48C0-A6FD-9B61FEBF8800}', 'Unavailable', 'Unavailable'

windows
powershell
docker
asked on Server Fault Jun 21, 2018 by n0rd • edited Jun 24, 2018 by n0rd

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0