gpt4 book ai didi

Docker - 在正在运行的容器中安装 vcredist_x86.exe

转载 作者:行者123 更新时间:2023-12-04 17:39:56 27 4
gpt4 key购买 nike

我是 docker 的新手。我想运行 vcredist_x86.exe 在正在运行的容器中安装 msvcr120.dll,而不使用 docker 文件。我确实将 exe 文件从我的主机复制到容器。我的基本镜像是 Windows Server Core。

当我在 powershell 中运行时,我厌倦了使用命令: & 'C:\vcredist_x86.exe'和启动进程-FilePath “vcredist_x86.exe”但安装甚至没有开始运行。它只是闲置着。

输出:[1]:/image/jXPeR.png很多帮助将不胜感激。谢谢。

最佳答案

能否请您提供一个 dockerfile 如何在 docker 中安装 vcredist。

我尝试了不同的方法,但都没有成功。例如我的 dockerfile。它尝试安装一些东西,但系统中没有库和日志

来自 mcr.microsoft.com/windows/servercore:ltsc2019

SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';

$ProgressPreference = 'SilentlyContinue'; $verbosePreference='继续';"]

工作目录 c:/temp

添加 http://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/vcredist_x64.exe c:/temp/vcredist_x64.exe

RUN Start-Process -filepath C:/temp/vcredist_x64.exe -ArgumentList "/install", "/passive", "/norestart", "'/log c:/temp/a.txt'"-PassThru |等待过程

关于Docker - 在正在运行的容器中安装 vcredist_x86.exe,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54969984/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com