Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何将特定KB更新安装到Windows Server 2016 Docker容器_Windows_Containers_Windows Server_Windows Server 2016_Windows Container - Fatal编程技术网

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

如何将特定KB更新安装到Windows Server 2016 Docker容器,windows,containers,windows-server,windows-server-2016,windows-container,Windows,Containers,Windows Server,Windows Server 2016,Windows Container,我有一个Windows Server 2016 Docker容器,我想应用它。我想知道如何通过编程来实现它 您的Dockerfile可能如下所示: FROM microsoft/windowsservercore:ltsc2016 SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] RUN Invoke-WebRequest

我有一个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

您的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