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?
Asked
Active
Viewed 275 times
1 Answers
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