如何将特定的KB更新安装到Windows Server 2016 Docker容器

我有一个Windows Server 2016 Docker容器,我想对其应用a specific KB update。我想知道如何以编程方式进行操作吗?

baichi999999999 回答:如何将特定的KB更新安装到Windows Server 2016 Docker容器

您的Dockerfile可能如下所示:

FROM microsoft/windowsservercore:ltsc2016
SHELL ["powershell","-Command","$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN Invoke-WebRequest "KB_URL" -OutFile update.exe -UseBasicParsing ; \
Start-Process -FilePath 'update.exe' -ArgumentList '--quiet','--norestart' -Wait ; \
Remove-Item .\update.exe
本文链接:https://www.f2er.com/2904954.html

大家都在问