Reputation: 51
i am new to docker. I would like to run vcredist_x86.exe to install msvcr120.dll inside the running container without using a docker file. I did copy the exe file from my host to container. My base image is windows server core.
When I am in the running in powershell , i tired using the command : & ‘C:\vcredist_x86.exe’ and Start-Process -FilePath “vcredist_x86.exe” but the installation didnt even start running. It just remained idle.
Output: [1]: https://i.sstatic.net/jXPeR.png Much help would be appreciated. Thank you.
Upvotes: 3
Views: 2518
Reputation: 670
I managed to install the old 2005 package inside of a Docker image. The flags you provided are for later versions of Microsoft Visual C++ package.
# syntax=docker/dockerfile:1
# escape=`
ARG WINDOWS_VERSION=ltsc2022
FROM mcr.microsoft.com/windows/servercore:${WINDOWS_VERSION}
USER ContainerAdministrator
RUN curl --fail -L -o "%TEMP%\vc_redist.x86.exe" "https://download.microsoft.com/download/8/B/4/8B42259F-5D70-43F4-AC2E-4B208FD8D66A/vcredist_x86.EXE" `
&& "%TEMP%\vc_redist.x86.exe" /Q `
&& del "%TEMP%\vc_redist.x86.exe"
USER ContainerUser
Upvotes: 0
Reputation: 9
Could you please provide a dockerfile how to install vcredist inside docker.
I tried different ways but no success. For example my dockerfile. It tries to install something but there are no libs and logs in the system
FROM mcr.microsoft.com/windows/servercore:ltsc2019
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';
$ProgressPreference = 'SilentlyContinue'; $verbosePreference='Continue';"]
WORKDIR c:/temp
ADD 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 | wait-process
Upvotes: 0