1

I have a Windows Server 2016 Docker container and I want to apply a specific KB update to it. I wonder how to do it programmatically?

user3545211
  • 161
  • 2
  • 6

1 Answers1

0

Your Dockerfile could look like this:

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
HostMAX
  • 177
  • 1
  • 5