【问题标题】:Creating a docker image for windows that requires execution of setup executables为需要执行安装程序可执行文件的 Windows 创建 docker 映像
【发布时间】:2017-01-26 15:39:54
【问题描述】:

我正在为 Windows 制作一个 docker 映像。此映像基于 microsoft/nanoserver 映像。应该在映像中安装一些不同的组件,以便由它制成的容器不再需要安装这些组件。好吧,我想这就是每个 docker 镜像的目的。

但是,我的问题是:对于 Windows docker 映像和 Windows 安装程序,这将如何工作?实际上,Windows 的安装程序可执行文件有一个 GUI,需要用户与安装程序交互并提供不同的信息。在 Ubuntu 的情况下,它似乎更容易,因为我只运行 apt-get install 并且我可以获取二进制文件并轻松安装它们。

我问自己更具体:

  • 我看到一些 Windows 设置有类似 silentquiet 开关。但我想我不能假设这是 Windows 功能,每个 setup.exe 都有这样的开关,对吧?这可能取决于设置的创建者是否包含此选项。
  • 如何使用 PowerShell 在 Windows 上启动安装程序?它只是命令 setup.exe 还是 Start-Process setup.exe 或 ...?

提前感谢您的帮助和问候

【问题讨论】:

    标签: windows docker installation dockerfile docker-image


    【解决方案1】:

    但我想我不能假设这是 Windows 功能并且每个 setup.exe 都有这样的开关,对吧?

    不,但到目前为止我遇到的所有软件包都以一种或另一种方式支持它。

    我什至如何使用 PowerShell 在 Windows 上启动安装程序?它只是命令 setup.exe 还是 Start-Process setup.exe

    详见本期:https://github.com/docker/docker/issues/30395#issuecomment-274933963

    我一般用Start-Process -FilePath 'installer.exe' -ArgumentList 'arg1', 'arg2' -Wait

    巧克力也可以用:https://github.com/StefanScherer/dockerfiles-windows/tree/master/chocolatey

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-14
      • 1970-01-01
      • 2021-06-16
      • 2020-01-17
      • 1970-01-01
      相关资源
      最近更新 更多