Я управляю microsoft/windowsservercore:1803
в докере:
docker run -it microsoft/windowsservercore:1803
внутри я запускаю PowerShell и запускаю Get-WindowsCapability
командлет и получите следующий результат:
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
К какой услуге это относится? Могу ли я настроить контейнер так, чтобы он позволял мне его запускать, или Add-WindowsCapability
командлеты?
В конечном итоге я хочу запустить [официально распространяемый Microsoft] сервер OpenSSH.
Обновить. Я проверил статус служб Windows Update и TrustedInstaller в контейнере (как предлагалось в комментариях): первый был отключен, поэтому я включил его:
Set-Service -Name wuauserv -StartupType Manual
Start-Service -name wuauserv
И попробовал бежать Get-WindowsCapability
очередной раз:
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
По-прежнему не работает, но ошибка теперь другая.
Вот что я вижу в журнале событий:
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.
Два сообщения об ошибках:
Описание для события с идентификатором «10001» в источнике «DCOM» не найдено. На локальном компьютере может не быть необходимой информации реестра или файлов DLL сообщений для отображения сообщения, либо у вас может не быть доступа к ним. Следующая информация является частью события: 'C: \ Windows \ system32 \ DllHost.exe / Processid: {AA65DD7C-83AC-48C0-A6FD-9B61FEBF8800}', '0', '{AA65DD7C-83AC-48C0-A6FD- 9B61FEBF8800} »,« Недоступно »,« Недоступно »
Описание для события с идентификатором «10001» в источнике «DCOM» не найдено. На локальном компьютере может не быть необходимой информации реестра или файлов DLL сообщений для отображения сообщения, либо у вас может не быть доступа к ним. Следующая информация является частью события: 'C: \ Windows \ system32 \ DllHost.ex / Processid: {AA65DD7C-83AC-48C0-A6FD-9B61FEBF8800}', '1008', '{AA65DD7C-83AC-48C0-A6FD- 9B61FEBF8800} »,« Недоступно »,« Недоступно »