【问题标题】:How to install a specific KB update to a Windows Server 2016 Docker container如何将特定 KB 更新安装到 Windows Server 2016 Docker 容器
【发布时间】:2020-04-10 04:21:44
【问题描述】:

我有一个 Windows Server 2016 Docker 容器,我想将a specific KB update 应用到它。我想知道如何以编程方式做到这一点?

【问题讨论】:

    标签: windows containers windows-server windows-server-2016 windows-container


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-04-24
      • 2016-08-24
      • 1970-01-01
      • 1970-01-01
      • 2017-04-21
      • 2019-12-10
      • 1970-01-01
      • 2021-06-07
      相关资源
      最近更新 更多