Windows container build fails to install vcredist

Expected behavior

I tried several methods of installing vcredist (2012/2013) from a FROM microsoft/dotnet-framework:3.5 and SHELL ["powershell"] type of Dockerfile:

RUN Get-VcList | Get-VcRedist -Path $env:TEMP -Architecture x64 -Release "2012","2013" ; \
    Get-VcList | Install-VcRedist -Path $env:TEMP -Release "2012","2013" -Architecture x64
#or
RUN Invoke-WebRequest http://download.microsoft.com/download/0/5/6/056dcda9-d667-4e27-8001-8a0c6971d6b1/vcredist_x64.exe -OutFile “$env:TEMP\vc2013x64.exe” -UseBasicParsing
RUN Start-Process “$env:TEMP\vc2013x64.exe” ‘/features + /q’ -wait
RUN Remove-Item “$env:TEMP\vc2013x64.exe”
#or
COPY vc.redist.x86.2013.exe vc.redist.x86.2013.exe
COPY vc.redist.x86.2012.exe vc.redist.x86.2012.exe
RUN C:\vc.redist.x86.2012.exe /quiet /install; \
    C:\vc.redist.x86.2013.exe /quiet /install 

Actual behavior

reg query HKLM /s /f MSVCP120.dll
shows me that nothing got installed.

Information

When I however then run an interactive Powershell with the container and install the vcredist like above, the right dlls get registered. I can stop and commit the container as new image:tag.

Maybe someone can shed some light on why this is not working in the build…
TIA,

Run your installation inside powershell which will wait on output of installation like below.

RUN powershell.exe -Command Start-Process c:\vcredist_x86.exe -ArgumentList '/quiet' | Wait-Process

Hey, thanks for picking this up!
I thought I am already in powershell-mode with the

build instruction. It works! … but is also adding to my confusion :exploding_head:
Thanks in any case